using Api.Framework.Enums;
using Api.Framework.Tools;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Api.Framework.Model
{
///
/// 平台账号对象(拼多多|阿里妈妈|京东联盟)
///
public class fl_cps_member : base_model
{
public override string ToString()
{
switch (cpstype)
{
case CpsType.阿里妈妈:
case CpsType.多多进宝:
case CpsType.唯品联盟:
case CpsType.抖音联盟:
case CpsType.苏宁易购:
case CpsType.快手联盟:
return $"{usernick}({username})";
case CpsType.京东联盟:
return $"{username}({usernick})";
default:
return $"{usernick}({username})";
}
}
///
/// 登录名(京东联盟:key)
///
public string username { get; set; }
///
/// 用户昵称(京东联盟:unionId)
///
public string usernick { get; set; }
///
/// Cookies
///
[SugarColumn(ColumnDataType = "text")]
public string cookies { get; set; }
///
/// 登录时间
///
public DateTime logintime { get; set; }
///
/// 账号类型
///
public CpsType cpstype { get; set; }
///
/// 异常通知
///
public SwitchType abnormal_tip { get; set; }
///
/// 是否下载
///
public SwitchType is_download { get; set; }
private bool _online;
///
/// 在线
///
public bool online { get { return (cpstype == CpsType.阿里妈妈 || cpstype == CpsType.京东联盟 || cpstype == CpsType.抖音联盟) ? _online : true; } set { _online = value; } }
///
/// 高佣是否有效(淘宝有效)
///
public bool is_valid { get; set; }
///
/// 其他
///
[SugarColumn(ColumnDataType = "text")]
public string other { get; set; }
public fl_cps_member()
{
this.online = false;
this.cookies = string.Empty;
this.abnormal_tip = SwitchType.开启;
this.is_download = SwitchType.开启;
this.is_valid = true;
}
}
}