You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using SqlSugar;
|
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace ProductionSystem_Model
|
|
|
|
|
{
|
|
|
|
|
[Serializable]
|
|
|
|
|
public class BaseModel
|
|
|
|
|
{
|
|
|
|
|
public BaseModel()
|
|
|
|
|
{
|
|
|
|
|
Id = Guid.NewGuid().ToString();
|
|
|
|
|
IsActive = true;
|
|
|
|
|
CreatedTime = DateTime.Now;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 主键
|
|
|
|
|
/// </summary>
|
|
|
|
|
[SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsNullable = false)]
|
|
|
|
|
public string Id { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 备注
|
|
|
|
|
/// </summary>
|
|
|
|
|
[SugarColumn(ColumnName = "remark")]
|
|
|
|
|
public string Remark { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 数据状态
|
|
|
|
|
/// 1—可用,0—不可用
|
|
|
|
|
/// </summary>
|
|
|
|
|
[SugarColumn(ColumnName = "isactive")]
|
|
|
|
|
public bool IsActive { get; set; } = true;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 创建时间
|
|
|
|
|
/// </summary>
|
|
|
|
|
[SugarColumn(ColumnName = "createdtime", IsOnlyIgnoreUpdate = true)]
|
|
|
|
|
public DateTime CreatedTime { get; set; } = DateTime.Now;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 创建者
|
|
|
|
|
/// </summary>
|
|
|
|
|
[SugarColumn(ColumnName = "createdby", IsOnlyIgnoreUpdate = true)]
|
|
|
|
|
public string CreatedBy { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 最后一次修改时间
|
|
|
|
|
/// </summary>
|
|
|
|
|
[SugarColumn(ColumnName = "updatedtime", IsOnlyIgnoreInsert = true)]
|
|
|
|
|
public DateTime? UpdatedTime { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 最后一次修改者
|
|
|
|
|
/// </summary>
|
|
|
|
|
[SugarColumn(ColumnName = "updatedby", IsOnlyIgnoreInsert = true)]
|
|
|
|
|
public string UpdatedBy { get; set; }
|
|
|
|
|
}
|
|
|
|
|
}
|