Files
shgx_tz_mes_backend_sync/ZR.Model/System/SysBase.cs

61 lines
2.3 KiB
C#
Raw Normal View History

2021-08-23 16:57:25 +08:00
//using Dapper.Contrib.Extensions;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;
using SqlSugar;
2021-12-04 13:15:57 +08:00
using OfficeOpenXml.Attributes;
2021-08-23 16:57:25 +08:00
namespace ZR.Model.System
{
2021-12-04 13:15:57 +08:00
[EpplusTable(PrintHeaders = true, AutofitColumns = true, AutoCalculate = true, ShowTotal = true)]
2021-08-23 16:57:25 +08:00
public class SysBase
{
[SugarColumn(IsOnlyIgnoreUpdate = true)]//设置后修改不会有此字段
[JsonProperty(propertyName: "CreateBy")]
2021-12-04 13:15:57 +08:00
[EpplusIgnore]
2021-08-23 16:57:25 +08:00
public string Create_by { get; set; }
[SugarColumn(IsOnlyIgnoreUpdate = true)]//设置后修改不会有此字段
[JsonProperty(propertyName: "CreateTime")]
2021-12-04 13:15:57 +08:00
[EpplusTableColumn(NumberFormat = "yyyy-MM-dd HH:mm:ss")]
2021-08-23 16:57:25 +08:00
public DateTime Create_time { get; set; } = DateTime.Now;
[JsonIgnore]
[JsonProperty(propertyName: "UpdateBy")]
[SugarColumn(IsOnlyIgnoreInsert = true)]
2021-12-04 13:15:57 +08:00
[EpplusIgnore]
2021-08-23 16:57:25 +08:00
public string Update_by { get; set; }
2021-09-21 20:31:35 +08:00
//[JsonIgnore]
2021-08-23 16:57:25 +08:00
[SugarColumn(IsOnlyIgnoreInsert = true)]//设置后插入数据不会有此字段
[JsonProperty(propertyName: "UpdateTime")]
2021-12-04 13:15:57 +08:00
[EpplusIgnore]
2021-09-23 10:15:50 +08:00
public DateTime? Update_time { get; set; }
2021-08-23 16:57:25 +08:00
public string Remark { get; set; }
/// <summary>
2021-11-21 15:48:24 +08:00
/// 搜索时间起始时间
2021-08-23 16:57:25 +08:00
/// </summary>
/// <summary>
/// Write需穿一个bool值false时insertupdate等操作会忽略此列和Computed的作用差不多看了源码也没发现与Computed有什么不一样的地方有了解的朋友可以赐教下哈
/// ExplicitKey指定此列为主键不自动增长类型例如guidExplicitKey与Key地区别下面会详细讲
/// Key指定此列为主键自动增长主键可忽略忽略后默认查找
/// [Computed]计算属性打上此标签对象地insertupdate等操作会忽略此列
/// </summary>
[SugarColumn(IsIgnore = true)]
[JsonIgnore]
2021-12-04 13:15:57 +08:00
[EpplusIgnore]
2021-08-23 16:57:25 +08:00
public DateTime? BeginTime { get; set; }
/// <summary>
/// 用于搜索使用
/// </summary>
[SugarColumn(IsIgnore = true)]
[JsonIgnore]
2021-12-04 13:15:57 +08:00
[EpplusIgnore]
2021-08-23 16:57:25 +08:00
public DateTime? EndTime { get; set; }
}
}