using System.ComponentModel.DataAnnotations.Schema;

namespace OASystem.Domain.Entities
{
    /// <summary>
    /// 实体基类
    /// </summary>
    public class EntityBase
    {
        /// <summary>
        /// 编号
        /// </summary>
        [SugarColumn(ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, IsNullable = false)]
        //[DatabaseGenerated(DatabaseGeneratedOption.None)]
        public int Id { get; set; }
        /// <summary>
        /// 创建者Id
        /// </summary>
        [SugarColumn(ColumnDescription = "创建者Id", IsNullable = true,ColumnDataType ="int")]
        public int CreateUserId { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        [SugarColumn(ColumnDescription = "创建时间", IsNullable = true,ColumnDataType = "DateTime")]
        public DateTime CreateTime { get; set; } = DateTime.Now;
        /// <summary>
        /// 删除者Id
        /// </summary>
        [SugarColumn(ColumnDescription = "删除者Id", IsNullable = true, ColumnDataType = "int")]
        public int? DeleteUserId { get; set; }
        /// <summary>
        /// 删除时间
        /// </summary>
        [SugarColumn(ColumnDescription = "删除时间",IsNullable = true,ColumnDataType = "varchar(30)")]
        public string DeleteTime { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        [SugarColumn(IsNullable =true,ColumnDataType ="varchar(500)")]
        public string Remark { get; set; }
        /// <summary>
        /// 是否删除
        /// </summary>
        [SugarColumn(ColumnDescription = "是否删除", IsNullable = true, ColumnDataType = "int")]
        public int IsDel { get; set; } = 0;
    }

}
