schangxiang@126.com
2024-04-23 f47411fb53aeee0c7bd514cbc841f9030349f448
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
using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
 
namespace Admin.NET.Core
{
    /// <summary>
    /// 领料单
    /// </summary>
    [Table("wms_takematerialorder")]
    [Comment("领料单")]
    public class WmsTakeMaterialOrder : DEntityBase, IEntityTypeBuilder<WmsTakeMaterialOrder>
    {
        /// <summary>
        ///  Billdate
        /// </summary>
        [Comment("单据大类")]
        [Required]
        public long OrderLargeCategory { get; set; }
 
        /// <summary>
        /// 单据小类
        /// </summary>
        [Comment("单据小类")]
        [Required]
        public long OrderSubclass { get; set; }
 
        /// <summary>
        ///事务类型
        ///销售领料:Z201 生产领料:Z221
        /// </summary>
        [Comment("事务类型")]
        public string MoveType { get; set; }
 
        /// <summary>
        /// SCM 领 料 申请单头表唯一标识
        /// </summary>
        [Comment("上位系统单据唯一识别码")]
        public long SOID { get; set; }
 
        /// <summary>
        /// 单据编号  
        /// </summary>
        [Comment("单据编号")]
        [Required]
        [MaxLength(255)]
        public string NO { get; set; }
 
        /// <summary>
        /// 领料单申请日期    
        /// </summary>
        [Comment("领料单申请日期")]
        public DateTimeOffset? Billdate { get; set; }
 
        /// <summary>
        /// 领用项目号
        /// </summary>
        [Comment("领用项目号")]
        [MaxLength(255)]
        public string WBSElementcode { get; set; }
 
        /// <summary>
        /// 领料部门    
        /// </summary>
        [Comment("领料部门")]
        [MaxLength(255)]
        public string BenefitingDepartcode { get; set; }
 
        /// <summary>
        /// 受益部门    
        /// </summary>
        [Comment("受益部门")]
        [MaxLength(255)]
        public string CostCenterID { get; set; }
 
        /// <summary>
        /// 客户
        /// </summary>
        [Comment("客户")]
        [MaxLength(255)]
        public string FI_Client_Analysis_H { get; set; }
 
        /// <summary>
        /// 是否公司间交易 1.是 2.否
        /// </summary>
        [Comment("是否公司间交易")]
        public long IsInnerCompany { get; set; }
 
        /// <summary>
        /// 领料人
        /// </summary>
        [Comment("领料人")]
        [MaxLength(255)]
        public string PickerID { get; set; }
 
        /// <summary>
        /// 仓储中心
        /// </summary>
        [Comment("仓储中心")]
        [MaxLength(255)]
        public string WarehouseCentername { get; set; }
 
        /// <summary>
        /// 公司
        /// </summary>
        [Comment("公司")]
        [MaxLength(255)]
        public string Companyname { get; set; }
 
        /// <summary>
        /// 施工队
        /// </summary>
        [Comment("施工队")]
        [MaxLength(255)]
        public string ConstructionTeamID { get; set; }
 
        /// <summary>
        /// 单据状态
        /// </summary>
        [Comment("单据状态")]
        [Required]
        public OrderStatusEnum OrderStatus { get; set; } = OrderStatusEnum.WEIXIAFA;
 
        /// <summary>
        /// 单据明细
        /// </summary>
        public ICollection<WmsTakeMaterialOrderDetail> WmsTakeMaterialOrderDetail { get; set; }
 
        /// <summary>
        /// 1对多配置关系
        /// </summary>
        /// <param name="entityBuilder"></param>
        /// <param name="dbContext"></param>
        /// <param name="dbContextLocator"></param>
        public void Configure(EntityTypeBuilder<WmsTakeMaterialOrder> entityBuilder, DbContext dbContext, Type dbContextLocator)
        {
            // 一对多配置
            entityBuilder.HasMany(x => x.WmsTakeMaterialOrderDetail)
                .WithOne(x => x.WmsTakeMaterialOrder)
                .HasForeignKey(x => x.OrderId);
        }
    }
}