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
using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System.ComponentModel.DataAnnotations.Schema;
 
namespace Admin.NET.Core
{
    /// <summary>
    /// 员工附属机构职位表
    /// </summary>
    [Table("sys_emp_ext_org_pos")]
    [Comment("员工附属机构职位表")]
    public class SysEmpExtOrgPos : IEntity, IEntityTypeBuilder<SysEmpExtOrgPos>
    {
        /// <summary>
        /// 员工Id
        /// </summary>
        [Comment("员工Id")]
        public long SysEmpId { get; set; }
 
        /// <summary>
        /// 一对一引用(员工)
        /// </summary>
        public SysEmp SysEmp { get; set; }
 
        /// <summary>
        /// 机构Id
        /// </summary>
        [Comment("机构Id")]
        public long SysOrgId { get; set; }
 
        /// <summary>
        /// 一对一引用(机构)
        /// </summary>
        public SysOrg SysOrg { get; set; }
 
        /// <summary>
        /// 职位Id
        /// </summary>
        [Comment("职位Id")]
        public long SysPosId { get; set; }
 
        /// <summary>
        /// 一对一引用(职位)
        /// </summary>
        public SysPos SysPos { get; set; }
 
        public void Configure(EntityTypeBuilder<SysEmpExtOrgPos> entityBuilder, DbContext dbContext, Type dbContextLocator)
        {
            entityBuilder.HasKey(c => new { c.SysEmpId, c.SysOrgId, c.SysPosId });
        }
    }
}