You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
135 lines
3.9 KiB
135 lines
3.9 KiB
1 year ago
|
using System;
|
||
|
using System.ComponentModel;
|
||
|
using System.ComponentModel.DataAnnotations;
|
||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||
|
using ChangkeTec.SDMS.Model.Attributes;
|
||
|
using ChangkeTec.SDMS.Model.Base;
|
||
|
using ChangkeTec.SDMS.Model.Enums;
|
||
|
|
||
|
namespace ChangkeTec.SDMS.Model.DataCenterTables
|
||
|
{
|
||
|
[Description("�û���")]
|
||
|
public class TA_USER : IUpdatableTable, ISoftDelete, IEnable, INotifyPropertyChanged
|
||
|
{
|
||
|
[IsDataGridColum(true, 1)]
|
||
|
[Description("�û���")]
|
||
|
[Required(ErrorMessage = "�û�������Ϊ��")]
|
||
|
[Index("IndexUser", Order = 0, IsUnique = true, IsClustered = false)]
|
||
|
[StringLength(50)]
|
||
|
public string UserName { get; set; }
|
||
|
|
||
|
[IsDataGridColum(true, 2)]
|
||
|
[Description("����")]
|
||
|
[Required(ErrorMessage = "���벻��Ϊ��")]
|
||
|
[StringLength(50)]
|
||
|
public string Password { get; set; }
|
||
|
|
||
|
[IsDataGridColum(true, 3)]
|
||
|
[Description("��ʵ����")]
|
||
|
[StringLength(50)]
|
||
|
public string TrueName { get; set; }
|
||
|
|
||
|
[IsDataGridColum(true, 7)]
|
||
|
[ColumnSource(ColumnSourceType.TABLE, typeof(TA_DEPT),
|
||
|
new[] {"DeptCode", "DeptName"})] //, "CompanyDeptSelector"
|
||
|
[Description("���ű���")]
|
||
|
[Required(ErrorMessage = "���ű��Ų���Ϊ��")]
|
||
|
[StringLength(50)]
|
||
|
public string DeptCode { get; set; }
|
||
|
|
||
|
[ColumnSource(ColumnSourceType.ENUM, typeof(EnumUserType))]
|
||
|
[IsDataGridColum(true, 5)]
|
||
|
[Description("�û�����")]
|
||
|
public EnumUserType UserType { get; set; } = EnumUserType.Admin;
|
||
|
|
||
|
|
||
|
[IsDataGridColum(true, 12)]
|
||
|
[Description("�����ʼ�")]
|
||
|
[StringLength(50)]
|
||
|
public string Email { get; set; }
|
||
|
|
||
|
[IsDataGridColum(true, 13)]
|
||
|
[Description("��ϵ�绰1")]
|
||
|
[StringLength(50)]
|
||
|
public string Phone1 { get; set; }
|
||
|
|
||
|
[IsDataGridColum(true, 14)]
|
||
|
[Description("��ϵ�绰2")]
|
||
|
[StringLength(50)]
|
||
|
public string Phone2 { get; set; }
|
||
|
|
||
|
[IsDataGridColum(true, 9)]
|
||
|
[Description("������¼ʱ��")]
|
||
|
[Column(TypeName = "datetime2")]
|
||
|
public DateTime? LastLoginTime { get; set; }
|
||
|
|
||
|
[IsDataGridColum(true, 10)]
|
||
|
[Description("������¼IP��ַ")]
|
||
|
[StringLength(50)]
|
||
|
public string LastLoginIp { get; set; }
|
||
|
|
||
|
[IsDataGridColum(true, 11)]
|
||
|
[Description("������¼��������")]
|
||
|
[StringLength(50)]
|
||
|
public string LastLoginClient { get; set; }
|
||
|
|
||
|
[IsDataGridColum(true, 8)]
|
||
|
[Index("IndexUserSessionId", Order = 0, IsUnique = false, IsClustered = false)]
|
||
|
[Description("�Ự����")]
|
||
|
[StringLength(50)]
|
||
|
public string SessionId { get; set; }
|
||
|
|
||
|
|
||
|
[Description("��ɾ��")]
|
||
|
public bool IsDeleted { get; set; }
|
||
|
|
||
|
[Description("�Ƿ�����")]
|
||
|
public bool Enable { get; set; }
|
||
|
|
||
|
#region �����ֶ�
|
||
|
|
||
|
[Description("������")]
|
||
|
[Required(AllowEmptyStrings = true)]
|
||
|
[StringLength(50)]
|
||
|
public string CreateUser { get; set; } = "";
|
||
|
|
||
|
[Description("����ʱ��")]
|
||
|
public DateTime CreateTime { get; set; } = DateTime.Now;
|
||
|
|
||
|
[Description("����")]
|
||
|
[StringLength(50)]
|
||
|
public string UpdateUser { get; set; } = "";
|
||
|
|
||
|
[Description("��ʱ��")]
|
||
|
public DateTime? UpdateTime { get; set; } = DateTime.Now;
|
||
|
|
||
|
|
||
|
[IsDataGridColum(true, 15)]
|
||
|
[Description("��ע")]
|
||
|
public string Remark { get; set; }
|
||
|
|
||
|
|
||
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||
|
public int UID { get; set; }
|
||
|
|
||
|
[Key]
|
||
|
public Guid GUID { get; set; } = Guid.NewGuid();
|
||
|
|
||
|
#endregion
|
||
|
|
||
|
|
||
|
#region INotifyPropertyChanged�ӿ�
|
||
|
|
||
|
public event PropertyChangedEventHandler PropertyChanged;
|
||
|
|
||
|
public void NotityPropertyChanged(string propertyName)
|
||
|
{
|
||
|
if (PropertyChanged != null)
|
||
|
{
|
||
|
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
|
||
|
}
|
||
|
}
|
||
|
|
||
|
#endregion
|
||
|
}
|
||
|
}
|