刘磊
2025-04-19 bd02cb3fa0fa75ffafb2cf17501929b1b1e0029b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
using Magicodes.ExporterAndImporter.Core;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace WIDESEAWCS_Core.DB.Models
{
    public class BaseEntity
    {
        #region 数据状态管理
 
        /// <summary>
        /// 状态 <br/>
        /// 中立字段,某些表可使用某些表不使用
        /// </summary>
        //public bool Enabled { get; set; } = true;
 
        /// <summary>
        /// 中立字段,某些表可使用某些表不使用   <br/>
        /// 逻辑上的删除,非物理删除  <br/>
        /// 例如:单据删除并非直接删除
        /// </summary>
        //public bool IsDeleted { get; set; }
 
        /// <summary>
        /// 中立字段 <br/>
        /// 是否内置数据
        /// </summary>
        //public bool IsInternal { get; set; }
 
        #endregion
 
        #region 创建
 
        /// <summary>
        /// 创建者
        /// </summary>
        [ImporterHeader(IsIgnore = true)]
        [ExporterHeader(DisplayName = "创建者")]
        [SugarColumn(IsNullable = false, IsOnlyIgnoreUpdate = true, ColumnDescription = "创建者")]
        public string Creater { get; set; }
 
        /// <summary>
        /// 创建时间
        /// </summary>
        [ImporterHeader(IsIgnore = true)]
        [ExporterHeader(DisplayName = "创建时间")]
        [SugarColumn(IsNullable = false, IsOnlyIgnoreUpdate = true, ColumnDescription = "创建时间")]
        public DateTime CreateDate { get; set; } = DateTime.Now;
 
        #endregion
 
        #region 修改
 
        /// <summary>
        /// 更新者
        /// </summary>
        [ImporterHeader(IsIgnore = true)]
        [ExporterHeader(DisplayName = "修改人")]
        [SugarColumn(IsNullable = true, IsOnlyIgnoreInsert = true, ColumnDescription = "修改人")]
        public string Modifier { get; set; }
 
        /// <summary>
        /// 修改日期
        /// </summary>
        [ImporterHeader(IsIgnore = true)]
        [ExporterHeader(DisplayName = "修改日期")]
        [SugarColumn(IsNullable = true, IsOnlyIgnoreInsert = true, ColumnDescription = "修改日期")]
        public DateTime? ModifyDate { get; set; }
 
        /// <summary>
        /// 数据版本
        /// </summary>
        //[SugarColumn(DefaultValue = "0", IsEnableUpdateVersionValidation = true)] //标识版本字段
        //public long Version { get; set; }
 
        #endregion
    }
}