| | |
| | | { |
| | | public Enterprise() |
| | | { |
| | | UserInfos = []; |
| | | Users = []; |
| | | Departments = []; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 企业认证Id |
| | | /// </summary> |
| | | public Guid EnterpriseAuthId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 企业认证 |
| | | /// </summary> |
| | | public EnterpriseAuth EnterpriseAuth { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 企业全称 |
| | | /// </summary> |
| | | [Required] |
| | | [MaxLength(128)] |
| | | public string EnterpriseName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 统一社会信用代码 |
| | | /// </summary> |
| | | [Required] |
| | | [MaxLength(18)] |
| | | public string SocietyCreditCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 营业执照照片 |
| | | /// </summary> |
| | | public string LicenseImage { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 法人姓名 |
| | | /// </summary> |
| | | [MaxLength(32)] |
| | | public string LegalPerson { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 法人身份证号 |
| | | /// </summary> |
| | | [MaxLength(18)] |
| | | public string LegalIdentity { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 所在省份编号 |
| | |
| | | public decimal SmsCost { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 是否实名 |
| | | /// </summary> |
| | | public bool IsReal { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 部门 |
| | | /// </summary> |
| | | public List<Department> Departments { get; set; } |
| | |
| | | /// <summary> |
| | | /// 用户信息 |
| | | /// </summary> |
| | | public List<UserInfo> UserInfos { get; set; } |
| | | public List<User> Users { get; set; } |
| | | |
| | | public void Configure(EntityTypeBuilder<Enterprise> entityBuilder, DbContext dbContext, Type dbContextLocator) |
| | | { |
| | | entityBuilder |
| | | .HasOne(it => it.EnterpriseAuth) |
| | | .WithOne(it => it.Enterprise) |
| | | .HasForeignKey<EnterpriseAuth>(it => it.Id); |
| | | entityBuilder |
| | | .HasOne(it => it.Province) |
| | | .WithMany() |
| | | .HasForeignKey(it => it.ProvinceCode) |