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