using System; using System.Collections.Generic; using Newtonsoft.Json; using FreeSql.DataAnnotations; using System.ComponentModel.DataAnnotations; using FreeSql; namespace EMSServerModel.Model { /// /// 用户表 /// [JsonObject(MemberSerialization.OptIn)] public partial class User : BaseEntity{ //[JsonProperty, Column(IsIdentity = true)] //public long Id { get; set; } /// /// 编号 /// [JsonProperty, Column(DbType = "varchar(50)", IsPrimary = true)] public string UserId { get; set; } = string.Empty; /// /// 头像 /// [JsonProperty, Column(DbType = "varchar(50)")] public string Avatar { get; set; } = string.Empty; /// /// 姓名 /// [JsonProperty, Column(DbType = "varchar(50)")] public string UserName { get; set; } = string.Empty; /// /// 艺名 /// [JsonProperty, Column(DbType = "varchar(50)")] public string NickName { get; set; } = string.Empty; /// /// 电话 /// [JsonProperty, Column(DbType = "varchar(50)")] public string Tel { get; set; } = string.Empty; /// /// 性别 /// [JsonProperty] public Sex Sex { get; set; } = Sex.男; /// /// 证件号 /// [JsonProperty, Column(DbType = "varchar(50)")] public string UID { get; set; } = string.Empty; /// /// 生日 /// [JsonProperty, Column(DbType = "date")] public DateTime? DateOfBirth { get; set; } /// /// 出生地 /// [JsonProperty, Column(DbType = "varchar(50)")] public string PlaceOfBirth { get; set; } = string.Empty; /// /// 居住地 /// [JsonProperty, Column(DbType = "varchar(50)")] public string Addr { get; set; } = string.Empty; /// /// 密码 /// [JsonProperty, Column(DbType = "varchar(50)")] public string Pwd { get; set; } = string.Empty; /// /// 部门编号 /// [JsonProperty] public long? DeptId { get; set; } /// /// 职务编号 /// [JsonProperty] public long? TitleId { get; set; } ///// ///// 创建时间 ///// //[JsonProperty, Column(DbType = "date")] //public DateTime CreateTime { get; set; } = DateTime.Now; /// /// 国籍 /// [JsonProperty, Column(DbType = "varchar(50)")] public string Nationality { get; set; } = string.Empty; /// /// 经手人 /// [JsonProperty, Column(DbType = "varchar(50)")] public string Handler { get; set; } = string.Empty; /// /// 启用 /// [JsonProperty] public bool IsEnable { get; set; } = true; /// /// 备注 /// [JsonProperty, Column(DbType = "varchar(100)")] public string Memos { get; set; } /// /// /// [Navigate(ManyToMany = typeof(UserRole))] public virtual ICollection Roles { get; protected set; } } /// /// 性别枚举 /// public enum Sex { /// /// 女=0 /// 女=0, /// /// 男=1 /// 男=1 } }