服务端的TigerApi 框架,基于.NET6 2024 版本
Rodney Chen
6 天以前 bdf6174b1065a24877f16bba68921772a9586b48
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
using System;
using SqlSugar;
using System.Linq;
using System.ComponentModel;
using System.Collections.Generic;
 
namespace Tiger.Model
{
    /// <summary>
    /// 实体:完工入库单(ERP)
    /// </summary>
    [Description("Primary:ID")]
    [DisplayName("完工入库单(ERP)")]
    [Serializable]
    [SugarTable("BIZ_ERP_PROD_IN")]
    public class BIZ_ERP_PROD_IN : DbEntityWithAuth
    {
        #region 构造函数
        /// <summary>
        /// 实体:完工入库单(ERP)
        /// </summary>
        public BIZ_ERP_PROD_IN() { }
        #endregion
 
        #region 公共属性
        /// <summary>
        /// 单据号码
        /// </summary>
        [DisplayName("单据号码")]
        public string BILLCODE { get; set; }
        /// <summary>
        /// 单据时间
        /// </summary>
        [DisplayName("单据时间")]
        public DateTime BILLDATE { get; set; } = DateTime.MinValue;
        /// <summary>
        /// 单据状态(0INIT新增|1AUDITED已审核|2WORKING作业中|3COMPLETE完成)
        /// </summary>
        [DisplayName("单据状态(0INIT新增|1AUDITED已审核|2WORKING作业中|3COMPLETE完成)")]
        public int STATUS { get; set; }
        /// <summary>
        /// 机型(来源:T100)
        /// </summary>
        [DisplayName("机型(来源:T100)")]
        public string ITEM_MODEL { get; set; }
        /// <summary>
        /// 业务类型
        /// </summary>
        [DisplayName("业务类型")]
        public string BIZTYPE { get; set; }
        /// <summary>
        /// 仓库编码
        /// </summary>
        [DisplayName("仓库编码")]
        public string WAREHOUSECODE { get; set; }
        /// <summary>
        /// 来源类型
        /// </summary>
        [DisplayName("来源类型")]
        public int SOURCETYPE { get; set; }
        /// <summary>
        /// 来源编码
        /// </summary>
        [DisplayName("来源编码")]
        public string SOURCECODE { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        [DisplayName("备注")]
        public string REMARK { get; set; }
        /// <summary>
        /// ERP单据号码
        /// </summary>
        [DisplayName("ERP单据号码")]
        public string ERP_BILL_CODE { get; set; }
        /// <summary>
        /// -1:未处理,0:同步处理完,>0:同步处理失败次数
        /// </summary>
        [DisplayName("-1:未处理,0:同步处理完,>0:同步处理失败次数")]
        public int HANDLED { get; set; }
        /// <summary>
        /// 最后一次同步处理日期
        /// </summary>
        [DisplayName("最后一次同步处理日期")]
        public DateTime HANDLED_DATE { get; set; } = DateTime.MinValue;
        /// <summary>
        /// 过账提交的JSON
        /// </summary>
        [DisplayName("过账提交的JSON")]
        public string COMMIT_JSON { get; set; }
        /// <summary>
        /// 过账提交的返回信息
        /// </summary>
        [DisplayName("过账提交的返回信息")]
        public string COMMIT_MSG { get; set; }
        #endregion
 
        #region 虚拟属性
        /*例子
        [SugarColumn(IsIgnore = true)]
        public string FieldName { get; set; }
        */
        #endregion
 
        #region 外键属性
        /*例子
        //一对一外键导航
        [Navigate(NavigateType.OneToOne, nameof(ClassAId))]//一对一 ClassAId是BIZ_ERP_PROD_IN类里面的外键ID字段
        public ClassA ClassA { get; set; } //注意禁止手动赋值,只能是null
        //一对多外键导航
        [Navigate(NavigateType.OneToMany, nameof(ClassA.BIZ_ERP_PROD_INId))]//ClassA表中的BIZ_ERP_PROD_INId
        public List<ClassA> ClassAList { get; set; }//注意禁止手动赋值,只能是null
        //多对多外键导航
        [Navigate(typeof(MappingClass), nameof(MappingClass.BIZ_ERP_PROD_INId), nameof(MappingClass.ClassAId))]//注意顺序
        public List<ClassA> ClassAList { get; set; } //注意禁止手动赋值,只能是null
        */
 
        [Navigate(NavigateType.OneToMany, nameof(BIZ_ERP_PROD_IN_DTL.BILLCODE), nameof(BILLCODE))]
        public List<BIZ_ERP_PROD_IN_DTL> DtlsWithGhost { get; set; }//注意禁止手动赋值,只能是null
 
        [SugarColumn(IsIgnore = true)]
        public List<BIZ_ERP_PROD_IN_DTL> Dtls => DtlsWithGhost?.Where(q => !q.GHOST_ROW).ToList();
 
        [Navigate(NavigateType.OneToMany, nameof(BIZ_ERP_PROD_IN_SN.BUSINESSCODE), nameof(BILLCODE))]
        public List<BIZ_ERP_PROD_IN_SN> SnListWithGhost { get; set; }//注意禁止手动赋值,只能是null
 
        [SugarColumn(IsIgnore = true)]
        public List<BIZ_ERP_PROD_IN_SN> SnList => SnListWithGhost?.Where(q => !q.GHOST_ROW).ToList();
 
        #endregion 外键属性
 
        #region 枚举变量
        /*例子
        public enum FieldNames
        {
            [Description("枚举描述0")]
            Enum0,
            [Description("枚举描述1")]
            Enum1,
        }
        */
 
        /// <summary>
        /// 枚举:单据状态(0INIT新增|1AUDITED已审核|2WORKING作业中|3COMPLETE完成)
        /// </summary>
        public enum STATUSs
        {
            [Description("新增")]
            INIT = 0,
            [Description("已审核")]
            AUDITED = 1,
            [Description("作业中")]
            WORKING = 2,
            [Description("完成")]
            COMPLETE = 3,
        }
        #endregion
 
        #region 公共方法
 
        #endregion
 
    }//endClass
}