| | |
| | | using System; |
| | | using Furion.DatabaseAccessor; |
| | | using Microsoft.EntityFrameworkCore; |
| | | using Microsoft.EntityFrameworkCore.Metadata.Builders; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel.DataAnnotations; |
| | | using System.Linq; |
| | |
| | | /// <summary> |
| | | /// 企业 |
| | | /// </summary> |
| | | public class Enterprise : CommonEntity |
| | | public class Enterprise : CommonEntity, IEntityTypeBuilder<Enterprise> |
| | | { |
| | | public Enterprise() |
| | | { |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 企业认证方式 |
| | | /// 企业认证Id |
| | | /// </summary> |
| | | public EnumEnterpriseRealMethod? EnterpriseRealMethod { get; set; } |
| | | public Guid EnterpriseAuthId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 企业全称 |
| | | /// 企业认证 |
| | | /// </summary> |
| | | [Required] |
| | | [MaxLength(128)] |
| | | public string EnterpriseName { get; set; } |
| | | public EnterpriseAuth EnterpriseAuth { 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> |
| | | /// 所在省份Id |
| | | /// </summary> |
| | | public Guid? ProvinceId { get; set; } |
| | | public string ProvinceCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 所在省份 |
| | |
| | | public DictionaryData Province { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 所在城市Id |
| | | /// 所在城市编号 |
| | | /// </summary> |
| | | public Guid? CityId { get; set; } |
| | | public string CityCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 所在城市 |
| | |
| | | public DictionaryData City { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 所属行业Id |
| | | /// 所属行业编号 |
| | | /// </summary> |
| | | public Guid? IndustryTypeId { get; set; } |
| | | public string IndustryTypeCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 所属行业 |
| | |
| | | public string ContactEmail { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 法人或经办人实名方式 |
| | | /// 支付通道 |
| | | /// </summary> |
| | | public EnumPersonalRealMethod? PersonalRealMethod { get; set; } |
| | | public EnumPayAccess? PayAccess { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 法人或经办人姓名 |
| | | /// 开户总行 |
| | | /// </summary> |
| | | [MaxLength(32)] |
| | | public string Name { get; set; } |
| | | public string BankName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 法人或经办人身份证号 |
| | | /// 开户支行 |
| | | /// </summary> |
| | | [MaxLength(18)] |
| | | public string Identity { get; set; } |
| | | public string BankBranchName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 法人或经办人身份证人像面 |
| | | /// </summary> |
| | | public string IdentityImg { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 法人或经办人身份证国徽面 |
| | | /// </summary> |
| | | public string IdentityBackImg { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 法人或经办人银行卡号 |
| | | /// 银行账户 |
| | | /// </summary> |
| | | [MaxLength(32)] |
| | | public string BankCard { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 法人或经办人银行卡照片 |
| | | /// 是否已校验银行账户 |
| | | /// </summary> |
| | | public string BankCardImg { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 法人或经办人手机号 |
| | | /// </summary> |
| | | [MaxLength(11)] |
| | | public string PhoneNumber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 是否委托经办人 |
| | | /// </summary> |
| | | public bool? Proxy { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 企业授权书 |
| | | /// </summary> |
| | | public string ProxyPowerAttorneyUrl { get; set; } |
| | | public bool IsCheckedBankCard { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 实名通道 |
| | |
| | | public EnumRealAccess? RealAccess { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 是否实名 |
| | | /// 实名费用 |
| | | /// </summary> |
| | | public bool IsReal { get; set; } |
| | | public decimal? RealVerifyCost { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 签约费用 |
| | | /// </summary> |
| | | public decimal? SignCost { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 一口价 |
| | | /// </summary> |
| | | public decimal? MergeSignCost { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 短信通道 |
| | | /// </summary> |
| | | public EnumSmsAccess? SmsAccess { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 短信费用 |
| | | /// </summary> |
| | | public decimal SmsCost { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 部门 |
| | |
| | | /// 用户信息 |
| | | /// </summary> |
| | | public List<UserInfo> UserInfos { get; set; } |
| | | |
| | | public void Configure(EntityTypeBuilder<Enterprise> entityBuilder, DbContext dbContext, Type dbContextLocator) |
| | | { |
| | | entityBuilder |
| | | .HasOne(it => it.Province) |
| | | .WithMany() |
| | | .HasForeignKey(it => it.ProvinceCode) |
| | | .HasPrincipalKey(it => it.Code) |
| | | .OnDelete(DeleteBehavior.Restrict); |
| | | entityBuilder |
| | | .HasOne(it => it.City) |
| | | .WithMany() |
| | | .HasForeignKey(it => it.CityCode) |
| | | .HasPrincipalKey(it => it.Code) |
| | | .OnDelete(DeleteBehavior.Restrict); |
| | | entityBuilder |
| | | .HasOne(it => it.IndustryType) |
| | | .WithMany() |
| | | .HasForeignKey(it => it.IndustryTypeCode) |
| | | .HasPrincipalKey(it => it.Code) |
| | | .OnDelete(DeleteBehavior.Restrict); |
| | | } |
| | | } |
| | | } |