|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Linq;
|
|
|
using System.Text;
|
|
|
using Newtonsoft.Json;
|
|
|
using NPoco;
|
|
|
|
|
|
namespace POSV.Entity
|
|
|
{
|
|
|
/// <summary>
|
|
|
/// 门店可登陆员工
|
|
|
/// </summary>
|
|
|
[Serializable]
|
|
|
[JsonObject(MemberSerialization.OptIn)]
|
|
|
[TableName("pos_worker")]
|
|
|
[PrimaryKey(new string[] { "id" , "no" } , AutoIncrement = false)]
|
|
|
public class Worker : BaseEntity
|
|
|
{
|
|
|
public Worker()
|
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 租户ID
|
|
|
/// </summary>
|
|
|
[JsonProperty(PropertyName = "tenantId")]
|
|
|
[Column("tenantId")]
|
|
|
public string TenantId { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 门店ID
|
|
|
/// </summary>
|
|
|
[JsonProperty(PropertyName = "storeId")]
|
|
|
[Column("storeId")]
|
|
|
public string StoreId { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 部门ID
|
|
|
/// </summary>
|
|
|
[JsonProperty(PropertyName = "departmentId")]
|
|
|
[Column("departmentId")]
|
|
|
public string DepartmentId { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 人员工号
|
|
|
/// </summary>
|
|
|
[JsonProperty(PropertyName = "no")]
|
|
|
[Column("no")]
|
|
|
public string No { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 人员姓名
|
|
|
/// </summary>
|
|
|
[JsonProperty(PropertyName = "name")]
|
|
|
[Column("name")]
|
|
|
public string Name { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 性别(0男1女)
|
|
|
/// </summary>
|
|
|
[JsonProperty(PropertyName = "sex")]
|
|
|
[Column("sex")]
|
|
|
public int Sex { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 出生日期
|
|
|
/// </summary>
|
|
|
[JsonProperty(PropertyName = "birthday")]
|
|
|
[Column("birthday")]
|
|
|
public string Birthday { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 邮箱
|
|
|
/// </summary>
|
|
|
[JsonProperty(PropertyName = "email")]
|
|
|
[Column("email")]
|
|
|
public string Email { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 手机
|
|
|
/// </summary>
|
|
|
[JsonProperty(PropertyName = "mobile")]
|
|
|
[Column("mobile")]
|
|
|
public string Mobile { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 登录密码
|
|
|
/// </summary>
|
|
|
[JsonProperty(PropertyName = "passwd")]
|
|
|
[Column("passwd")]
|
|
|
public string Passwd { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 备注
|
|
|
/// </summary>
|
|
|
[JsonProperty(PropertyName = "description")]
|
|
|
[Column("memo")]
|
|
|
public string Memo { get; set; }
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// Session
|
|
|
/// </summary>
|
|
|
[JsonProperty(PropertyName = "session")]
|
|
|
[Column("session")]
|
|
|
public string Session { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 最后登陆日期
|
|
|
/// </summary>
|
|
|
[JsonProperty(PropertyName = "lastDate")]
|
|
|
[Column("lastDate")]
|
|
|
public string LastDate { get; set; }
|
|
|
|
|
|
private decimal _maxDiscountRate = 1;
|
|
|
/// <summary>
|
|
|
/// 当前操作员拥有的最大折扣额度,88代表8.8折
|
|
|
/// </summary>
|
|
|
[JsonProperty(PropertyName = "maxDiscountRate")]
|
|
|
[Ignore]
|
|
|
public decimal MaxDiscountRate
|
|
|
{
|
|
|
get
|
|
|
{
|
|
|
return this._maxDiscountRate;
|
|
|
}
|
|
|
set
|
|
|
{
|
|
|
decimal v = (value / Convert.ToDecimal(100.0));
|
|
|
decimal.TryParse(v.ToString("0.##") , out v);
|
|
|
|
|
|
this._maxDiscountRate = v;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 最高免单金额
|
|
|
/// </summary>
|
|
|
[JsonProperty(PropertyName = "maxFreeAmount")]
|
|
|
[Ignore]
|
|
|
public decimal MaxFreeAmount { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 当前操作员的模块权限
|
|
|
/// </summary>
|
|
|
[JsonProperty(PropertyName = "permission")]
|
|
|
[Ignore]
|
|
|
public List<string> Permission { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 扩展字段1
|
|
|
/// </summary>
|
|
|
[JsonProperty(PropertyName = "ext1")]
|
|
|
[Column("ext1")]
|
|
|
public string Ext1 { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 收银员对应的门店信息
|
|
|
/// </summary>
|
|
|
[JsonProperty(PropertyName = "store")]
|
|
|
[Ignore]
|
|
|
public StoreInfo StoreInfo { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 扩展字段2
|
|
|
/// </summary>
|
|
|
[JsonProperty(PropertyName = "ext2")]
|
|
|
[Column("ext2")]
|
|
|
public string Ext2 { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
|
/// 扩展字段3
|
|
|
/// </summary>
|
|
|
[JsonProperty(PropertyName = "ext3")]
|
|
|
[Column("ext3")]
|
|
|
public string Ext3 { get; set; }
|
|
|
}
|
|
|
}
|