增加业务model基类
This commit is contained in:
parent
e49d007908
commit
5174fc9ec0
37
ZR.Model/BaseModel.cs
Normal file
37
ZR.Model/BaseModel.cs
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
using MiniExcelLibs.Attributes;
|
||||||
|
|
||||||
|
namespace ZR.Model;
|
||||||
|
|
||||||
|
public class BaseModel
|
||||||
|
{
|
||||||
|
[SugarColumn(IsOnlyIgnoreUpdate = true)]
|
||||||
|
[JsonProperty(propertyName: "CreateBy")]
|
||||||
|
[ExcelIgnore]
|
||||||
|
public long CreateBy { get; set; }
|
||||||
|
|
||||||
|
[SugarColumn(IsOnlyIgnoreUpdate = true)]
|
||||||
|
[JsonProperty(propertyName: "CreateName")]
|
||||||
|
[ExcelIgnore]
|
||||||
|
public string CreateName { get; set; }
|
||||||
|
|
||||||
|
[SugarColumn(IsOnlyIgnoreUpdate = true)]
|
||||||
|
[JsonProperty(propertyName: "CreateTime")]
|
||||||
|
[ExcelColumn(Format = "yyyy-MM-dd HH:mm:ss")]
|
||||||
|
public DateTime CreateTime { get; set; } = DateTime.Now;
|
||||||
|
|
||||||
|
[SugarColumn(IsOnlyIgnoreInsert = true)]
|
||||||
|
[JsonProperty(propertyName: "UpdateBy")]
|
||||||
|
[ExcelIgnore]
|
||||||
|
public long UpdateBy { get; set; }
|
||||||
|
|
||||||
|
[SugarColumn(IsOnlyIgnoreInsert = true)]
|
||||||
|
[JsonProperty(propertyName: "UpdateName")]
|
||||||
|
[ExcelIgnore]
|
||||||
|
public string UpdateName { get; set; }
|
||||||
|
|
||||||
|
[SugarColumn(IsOnlyIgnoreInsert = true, IsNullable = true)]
|
||||||
|
[JsonProperty(propertyName: "UpdateTime")]
|
||||||
|
[ExcelIgnore]
|
||||||
|
public DateTime? UpdateTime { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,4 +1,5 @@
|
|||||||
global using System.Collections.Generic;
|
global using System.Collections.Generic;
|
||||||
global using System;
|
global using System;
|
||||||
global using SqlSugar;
|
global using SqlSugar;
|
||||||
global using Newtonsoft.Json;
|
global using Newtonsoft.Json;
|
||||||
|
global using Infrastructure.Attribute;
|
||||||
Loading…
x
Reference in New Issue
Block a user