diff --git a/src/Shentun.Peis.Application/ItemResultTemplates/ItemResultTemplateAppService.cs b/src/Shentun.Peis.Application/ItemResultTemplates/ItemResultTemplateAppService.cs index e47bbc26..325c6a43 100644 --- a/src/Shentun.Peis.Application/ItemResultTemplates/ItemResultTemplateAppService.cs +++ b/src/Shentun.Peis.Application/ItemResultTemplates/ItemResultTemplateAppService.cs @@ -94,7 +94,39 @@ namespace Shentun.Peis.ItemResultTemplates } + /// + /// 获取项目结果模板列表 根据项目ID + /// + /// 项目ID + /// + public async Task> GetListInItemIdAsync(Guid ItemId) + { + + var entlist = await Repository.GetListAsync(m => m.ItemId == ItemId); + + + var entdto = entlist.Select(s => new ItemResultTemplateDto + { + CreationTime = s.CreationTime, + CreatorId = s.CreatorId, + ItemId = s.ItemId, + Id = s.Id, + LastModificationTime = s.LastModificationTime, + LastModifierId = s.LastModifierId, + DiagnosisId = s.DiagnosisId, + SimpleCode = s.SimpleCode, + ResultStatusId = s.ResultStatusId, + Result = s.Result, + IsResultIntoSummary = s.IsResultIntoSummary, + DisplayOrder = s.DisplayOrder, + IsNameIntoSummary = s.IsNameIntoSummary, + CreatorName = EntityHelper.GetUserName(_userRepository, s.CreatorId), + LastModifierName = EntityHelper.GetUserName(_userRepository, s.LastModifierId) + }).ToList(); + + return entdto; + } /// diff --git a/src/Shentun.Peis.Domain/Models/Patient.cs b/src/Shentun.Peis.Domain/Models/Patient.cs index 6ac698c8..efab177b 100644 --- a/src/Shentun.Peis.Domain/Models/Patient.cs +++ b/src/Shentun.Peis.Domain/Models/Patient.cs @@ -16,6 +16,14 @@ namespace Shentun.Peis.Models [Index(nameof(DisplayName), Name = "ix_patient_1")] public class Patient: AuditedEntity,IDisplayName { + + /// + /// 档案号 需要配置唯一索引 + /// + [Column("patient_no")] + [StringLength(30)] + public string PatientNo { get; set; } + /// /// 登录密码 /// diff --git a/src/Shentun.Peis.Domain/Models/PatientRegister.cs b/src/Shentun.Peis.Domain/Models/PatientRegister.cs index c03f2234..db7e8834 100644 --- a/src/Shentun.Peis.Domain/Models/PatientRegister.cs +++ b/src/Shentun.Peis.Domain/Models/PatientRegister.cs @@ -45,7 +45,7 @@ namespace Shentun.Peis.Models /// 档案号 /// [Column("patient_id")] - //[StringLength(10)] + [StringLength(10)] public Guid PatientId { get; set; } /// /// 体检次数 diff --git a/src/Shentun.Peis.Domain/Models/SmsSend.cs b/src/Shentun.Peis.Domain/Models/SmsSend.cs index 2eb99a98..d31e3229 100644 --- a/src/Shentun.Peis.Domain/Models/SmsSend.cs +++ b/src/Shentun.Peis.Domain/Models/SmsSend.cs @@ -30,7 +30,7 @@ namespace Shentun.Peis.Models /// 人员ID /// [Column("patient_id")] - //[StringLength(10)] + [StringLength(10)] public Guid? PatientId { get; set; } /// /// 姓名 diff --git a/src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs b/src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs index 74e3e641..9c716d33 100644 --- a/src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs +++ b/src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs @@ -351,6 +351,24 @@ public class PeisDbContext : builder.Entity(entity => { entity.HasComment("组合项目"); + entity.Property(t => t.DisplayName).HasComment("名称"); + entity.Property(t => t.ShortName).HasComment("简称"); + entity.Property(t => t.ForSexId).HasComment("适用性别,M-男,F-女,A-全部"); + entity.Property(t => t.ItemTypeId).HasComment("项目类别"); + entity.Property(t => t.Price).HasComment("价格"); + entity.Property(t => t.DeviceTypeId).HasComment("仪器类别"); + entity.Property(t => t.InvoiceItemTypeId).HasComment("发票类别"); + entity.Property(t => t.IsItemResultMerger).HasComment("项目结果合并"); + entity.Property(t => t.IsBeforeEat).HasComment("餐前项目"); + entity.Property(t => t.ClinicalMeaning).HasComment("临床意义"); + entity.Property(t => t.DefaultResult).HasComment("默认结果"); + entity.Property(t => t.QueueTime).HasComment("候诊时间"); + entity.Property(t => t.IsDiagnosisFunction).HasComment("启用诊断函数"); + entity.Property(t => t.DiagnosisFunction).HasComment("诊断函数"); + entity.Property(t => t.IsContinueProcess).HasComment("诊断函数处理完毕后继续处理"); + entity.Property(t => t.IsPictureRotate).HasComment("体检报告图片旋转90°"); + entity.Property(t => t.IsCheck).HasComment("是检查项目"); + entity.Property(t => t.IsActive).HasComment("是启用"); @@ -391,6 +409,8 @@ public class PeisDbContext : entity.HasComment("组合项目包含项目"); + entity.Property(t => t.ItemId).HasComment("项目编码"); + entity.Property(e => e.AsbitemId).IsFixedLength(); entity.Property(e => e.ItemId).IsFixedLength(); @@ -416,6 +436,10 @@ public class PeisDbContext : .HasName("pk_department_asbitem_guide"); entity.HasComment("体检中心组和项目指引内容"); + entity.Property(t => t.OrganizationUnitId).HasComment("单位科室ID"); + entity.Property(t => t.AsbitemId).HasComment("组合项目ID"); + entity.Property(t => t.ForSexId).HasComment("适用性别ID"); + entity.Property(t => t.Guide).HasComment("指引单内容"); entity.Property(e => e.OrganizationUnitId).IsFixedLength(); @@ -428,6 +452,9 @@ public class PeisDbContext : { entity.HasComment("组和项目包含价表项目"); + entity.Property(t => t.AsbitemId).HasComment("组合项目编号"); + entity.Property(t => t.PriceItemId).HasComment("价表项目编码"); + entity.Property(t => t.Amount).HasComment("数量"); entity.Property(e => e.Id).IsFixedLength(); @@ -441,7 +468,7 @@ public class PeisDbContext : builder.Entity(entity => { entity.HasComment("大文本结果结论"); - + entity.Property(t => t.Conclusion).HasComment("结论"); entity.Property(e => e.Id).IsFixedLength(); entity.Property(e => e.BigtextResultTemplateId).IsFixedLength(); @@ -463,7 +490,7 @@ public class PeisDbContext : entity.HasComment("大文本结果描述"); - + entity.Property(t => t.Description).HasComment("描述"); entity.Property(e => e.Id).IsFixedLength(); entity.Property(e => e.BigtextResultTemplateId).IsFixedLength(); @@ -484,7 +511,8 @@ public class PeisDbContext : { entity.HasComment("大文本结果模板"); - + entity.Property(t => t.DisplayName).HasComment("名称"); + entity.Property(t => t.BigtextResultTypeId).HasComment("结果类别编号"); entity.Property(e => e.Id).IsFixedLength(); entity.Property(e => e.BigtextResultTypeId).IsFixedLength(); @@ -503,7 +531,10 @@ public class PeisDbContext : { entity.HasComment("大文本结果类别"); - + entity.Property(t => t.DisplayName).HasComment("名称"); + entity.Property(t => t.ParentId).HasComment("父编号"); + entity.Property(t => t.PathCode).HasComment("路径编码"); + entity.Property(t => t.ItemTypeId).HasComment("项目类别"); entity.Property(e => e.Id).IsFixedLength(); //entity.Property(e => e.CreationTime).HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); @@ -525,6 +556,7 @@ public class PeisDbContext : { entity.HasComment("出生地"); + entity.Property(t => t.CountryCode).HasComment("国家标准码"); entity.Property(e => e.Id).IsFixedLength(); @@ -741,7 +773,7 @@ public class PeisDbContext : .HasComment("退费编号"); entity.Property(e => e.ChargeId).HasComment("收据号"); - + entity.Property(t => t.SettleAccountId).HasComment("结账ID"); //entity.Property(e => e.CreationTime) // .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)") // .HasComment("退费日期"); @@ -764,7 +796,8 @@ public class PeisDbContext : .HasName("pk_department_charge_back_pay"); entity.HasComment("退费支付方式"); - + entity.Property(t => t.PayModeId).HasComment("支付方式ID"); + entity.Property(t => t.BackMoeny).HasComment("退费金额"); entity.Property(e => e.PayModeId).IsFixedLength(); entity.HasOne(d => d.ChargeBack) @@ -832,7 +865,8 @@ public class PeisDbContext : entity.HasComment("常用字符"); - + entity.Property(t => t.DisplayName).HasComment("名称"); + entity.Property(t => t.CommonCharTypeId).HasComment("常用字符类别编号"); entity.Property(e => e.Id).IsFixedLength(); entity.Property(e => e.CommonCharTypeId).IsFixedLength(); @@ -854,7 +888,7 @@ public class PeisDbContext : { entity.HasComment("常用字符类别"); - + entity.Property(t => t.DisplayName).HasComment("名称"); entity.Property(e => e.Id).IsFixedLength(); //entity.Property(e => e.CreationTime).HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); @@ -871,7 +905,9 @@ public class PeisDbContext : //entity.HasKey(e => new { e.ContactPersonId, e.ContactMethodValue }).HasName("pk_department_contact_method"); - entity.HasComment("联系方式"); + entity.HasComment("联系方式新增量主键,更新映射关系"); + entity.Property(t => t.ContactMethodValue).HasComment("联系方式,比如18911254911,839860190@qq.com"); + entity.Property(t => t.ContactMethodType).HasComment("联系方式类别-比如0-手机、1-电子邮箱"); //entity.Property(e => e.ContactPersonId).IsFixedLength(); @@ -894,6 +930,10 @@ public class PeisDbContext : entity.HasComment("联系人"); + entity.Property(t => t.CustomerOrgId).HasComment("客户单位编号"); + entity.Property(t => t.DisplayName).HasComment("姓名"); + entity.Property(t => t.Title).HasComment("职务"); + entity.Property(t => t.Remark).HasComment("备注"); entity.Property(e => e.Id).IsFixedLength(); @@ -918,6 +958,8 @@ public class PeisDbContext : entity.HasComment("危急值关键字设置"); + entity.Property(t => t.DisplayName).HasComment("名称"); + entity.Property(t => t.CriticalValueTypeId).HasComment("危急值类别编号"); entity.Property(e => e.Id).IsFixedLength(); @@ -938,6 +980,9 @@ public class PeisDbContext : entity.HasComment("危急值类别"); + entity.Property(t => t.DisplayName).HasComment("名称"); + entity.Property(t => t.ParentId).HasComment("父编号"); + entity.Property(t => t.PathCode).HasComment("路径编码"); entity.Property(e => e.Id).IsFixedLength(); @@ -955,6 +1000,14 @@ public class PeisDbContext : entity.HasComment("团检单位设置"); + + entity.Property(t => t.ShortName).HasComment("简称"); + entity.Property(t => t.InvoiceName).HasComment("开票名称"); + entity.Property(t => t.ParentId).HasComment("父编号"); + entity.Property(t => t.PathCode).HasComment("路径编码"); + entity.Property(t => t.IsLock).HasComment("锁住"); + entity.Property(t => t.StatusFlag).HasComment("状态"); + entity.Property(e => e.Id) .IsFixedLength() @@ -1012,6 +1065,10 @@ public class PeisDbContext : entity.HasComment("团检单位收费"); + entity.Property(t => t.Payer).HasComment("付款人"); + entity.Property(t => t.ChargeFlag).HasComment("收退费标志"); + entity.Property(t => t.SettleAccountId).HasComment("结算账户ID"); + entity.Property(t => t.CustomerOrgRegisterId).HasComment("客户单位登记ID"); entity.Property(e => e.Id).ValueGeneratedNever(); @@ -1027,6 +1084,8 @@ public class PeisDbContext : builder.Entity(entity => { entity.HasComment("团检单位退费"); + entity.Property(t => t.CustomerOrgChargeId).HasComment("收费编号"); + entity.Property(t => t.SettleAccountId).HasComment("结算账户ID"); entity.Property(e => e.Id).ValueGeneratedNever(); @@ -1047,6 +1106,8 @@ public class PeisDbContext : .HasName("pk_org_charge_back_pay"); entity.HasComment("团结退费支付方式"); + entity.Property(t => t.PayModeId).HasComment("支付方式"); + entity.Property(t => t.BackMoeny).HasComment("退费金额"); entity.Property(e => e.PayModeId).IsFixedLength(); @@ -1068,6 +1129,8 @@ public class PeisDbContext : entity.HasComment("团检收费支付方式"); + entity.Property(t => t.PayModeId).HasComment("支付方式"); + entity.Property(t => t.ChargeMoney).HasComment("支付金额"); entity.Property(e => e.Id).ValueGeneratedNever(); @@ -1143,6 +1206,9 @@ public class PeisDbContext : .HasName("pk_org_group_detail"); entity.HasComment("团检分组包含组合项目"); + entity.Property(t => t.CustomerOrgGroupId).HasComment("分组编号"); + entity.Property(t => t.AsbitemId).HasComment("组合项目编号"); + entity.Property(t => t.Price).HasComment("价格"); entity.Property(e => e.CustomerOrgGroupId).IsFixedLength(); @@ -1165,6 +1231,11 @@ public class PeisDbContext : builder.Entity(entity => { entity.HasComment("团检体检登记"); + + + entity.Property(t => t.RegisterNo).HasComment("计划号"); + entity.Property(t => t.RegisterName).HasComment("计划名称"); + entity.Property(e => e.Id).ValueGeneratedNever(); @@ -1202,7 +1273,8 @@ public class PeisDbContext : { - entity.HasComment("团体类型设置"); + entity.HasComment("客户单位类别"); + entity.Property(t => t.DisplayName).HasComment("名称"); entity.Property(e => e.Id).IsFixedLength(); @@ -1213,7 +1285,7 @@ public class PeisDbContext : builder.Entity(entity => { - entity.HasComment("部门"); + entity.HasComment("部门,已经废弃"); entity.Property(e => e.Id).IsFixedLength(); @@ -1231,6 +1303,7 @@ public class PeisDbContext : builder.Entity(entity => { entity.HasComment("仪器类别设置"); + entity.Property(e => e.Id) .IsFixedLength() @@ -1257,6 +1330,14 @@ public class PeisDbContext : { entity.HasComment("诊断设置"); + entity.Property(t => t.DisplayName).HasComment("名称"); + entity.Property(t => t.ItemTypeId).HasComment("项目类别"); + entity.Property(t => t.SuggestionName).HasComment("建议名称"); + entity.Property(t => t.IsIll).HasComment("是疾病"); + entity.Property(t => t.IsSummaryTemplate).HasComment("是总检模板"); + entity.Property(t => t.ForSexId).HasComment("适用性别"); + entity.Property(t => t.DiagnosisLevelId).HasComment("诊断级别"); + entity.Property(e => e.Id).IsFixedLength(); //entity.Property(e => e.CreationTime).HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); @@ -1317,6 +1398,7 @@ public class PeisDbContext : builder.Entity(entity => { + entity.Property(e => e.Id).ValueGeneratedNever(); //entity.Property(e => e.LastModificationTime).HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); @@ -1327,6 +1409,7 @@ public class PeisDbContext : builder.Entity(entity => { entity.HasComment("诊断后缀设置"); + entity.Property(t => t.DisplayName).HasComment("名称"); entity.Property(e => e.Id).IsFixedLength(); @@ -1339,7 +1422,7 @@ public class PeisDbContext : builder.Entity(entity => { entity.HasComment("诊断模板设置"); - + entity.Property(t => t.DisplayName).HasComment("名称"); entity.Property(e => e.Id).IsFixedLength(); //entity.Property(e => e.CreationTime).HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); @@ -1353,6 +1436,8 @@ public class PeisDbContext : .HasName("pk_diagnosis_template_detail"); entity.HasComment("诊断模板包含明细"); + entity.Property(t => t.DiagnosisTemplateId).HasComment("诊断模板编号"); + entity.Property(t => t.DiagnosisId).HasComment("诊断编号"); entity.Property(e => e.DiagnosisTemplateId).IsFixedLength(); @@ -1374,6 +1459,9 @@ public class PeisDbContext : builder.Entity(entity => { entity.HasComment("诊断类别"); + entity.Property(t => t.DisplayName).HasComment("名称"); + entity.Property(t => t.ParentId).HasComment("父编号"); + entity.Property(t => t.PathCode).HasComment("路径编码"); entity.Property(e => e.Id).IsFixedLength(); @@ -1386,6 +1474,9 @@ public class PeisDbContext : builder.Entity(entity => { + entity.HasComment("随访方式"); + entity.Property(t => t.DisplayName).HasComment("名称"); + entity.Property(e => e.Id).IsFixedLength(); entity.ConfigureByConvention(); @@ -1393,6 +1484,19 @@ public class PeisDbContext : builder.Entity(entity => { + + entity.HasComment("随访计划"); + entity.Property(t => t.Content).HasComment("随访内容"); + entity.Property(t => t.Remark).HasComment("备注"); + entity.Property(t => t.FollowUpTypeId).HasComment("随访类别"); + entity.Property(t => t.FollowUpModeId).HasComment("随访方式"); + entity.Property(t => t.DoctorUserId).HasComment("医生"); + entity.Property(t => t.CycleDays).HasComment("周期天数"); + entity.Property(t => t.IsLoop).HasComment("是否循环"); + entity.Property(t => t.PerfomUserId).HasComment("执行者用户ID"); + entity.Property(t => t.PerfomTime).HasComment("执行时间"); + entity.Property(t => t.PerfomFlag).HasComment("执行标志"); + entity.Property(e => e.Id).ValueGeneratedNever(); entity.Property(e => e.FollowUpModeId).IsFixedLength(); @@ -1404,6 +1508,9 @@ public class PeisDbContext : builder.Entity(entity => { + entity.HasComment("随访类别"); + entity.Property(t => t.DisplayName).HasComment("名称"); + entity.Property(e => e.Id).IsFixedLength(); entity.ConfigureByConvention(); @@ -1411,7 +1518,7 @@ public class PeisDbContext : builder.Entity(entity => { - entity.HasComment("可支持性别设置"); + entity.HasComment("适用性别设置,固定编码"); entity.Property(e => e.Id).ValueGeneratedNever(); @@ -1422,6 +1529,7 @@ public class PeisDbContext : builder.Entity(entity => { + entity.HasComment("废弃"); //entity.Property(e => e.CreatedDate).HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); entity.ConfigureByConvention(); }); @@ -1429,6 +1537,7 @@ public class PeisDbContext : builder.Entity(entity => { entity.HasComment("指引类别"); + entity.Property(t => t.DisplayName).HasComment("名称"); entity.Property(e => e.Id).IsFixedLength(); @@ -1559,6 +1668,7 @@ public class PeisDbContext : builder.Entity(entity => { entity.HasComment("发票项目类别设置"); + entity.Property(t => t.DisplayName).HasComment("名称"); entity.Property(e => e.Id).IsFixedLength(); @@ -1569,7 +1679,7 @@ public class PeisDbContext : builder.Entity(entity => { entity.HasComment("发票单位设置"); - + entity.Property(t => t.DisplayName).HasComment("名称"); entity.Property(e => e.Id).ValueGeneratedNever(); //entity.Property(e => e.CreationTime).HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); @@ -1579,6 +1689,24 @@ public class PeisDbContext : builder.Entity(entity => { entity.HasComment("项目设置"); + entity.Property(t => t.DisplayName).HasComment("名称"); + entity.Property(t => t.EnglishShortName).HasComment("英文缩写"); + entity.Property(t => t.ItemTypeId).HasComment("项目类别"); + entity.Property(t => t.Price).HasComment("价格"); + entity.Property(t => t.PriceItemId).HasComment("价表项目编码"); + entity.Property(t => t.UnitId).HasComment("单位"); + entity.Property(t => t.DefaultResult).HasComment("默认结果"); + entity.Property(t => t.ReferenceRangeTypeFlag).HasComment("参考范围类别0-无参考范围,1-数字型,2-字符型,3-性激素"); + entity.Property(t => t.IsProduceSummary).HasComment("是生成小结"); + entity.Property(t => t.IsNameIntoSummary).HasComment("名称进入小结"); + entity.Property(t => t.IsDiagnosisFunction).HasComment("启用诊断函数"); + entity.Property(t => t.DiagnosisFunction).HasComment("诊断函数"); + entity.Property(t => t.IsCalculationItem).HasComment("是计算项目"); + entity.Property(t => t.CalculationFunction).HasComment("计算函数"); + entity.Property(t => t.IsContinueProcess).HasComment("是继续处理"); + entity.Property(t => t.ResultTemplateTypeFlag).HasComment("结果模板类别标志"); + entity.Property(t => t.InputCheck).HasComment("输入结果校验公式"); + entity.Property(t => t.IsActive).HasComment("启用"); entity.Property(e => e.Id).IsFixedLength(); @@ -1607,6 +1735,7 @@ public class PeisDbContext : builder.Entity(entity => { entity.HasComment("项目默认结果设置"); + entity.Property(t => t.DisplayName).HasComment("名称"); entity.Property(e => e.Id).IsFixedLength(); @@ -1742,7 +1871,7 @@ public class PeisDbContext : .HasName("pk_item_template_detail"); entity.HasComment("项目模板明细"); - + entity.Property(t => t.ItemId).HasComment("项目编号"); entity.Property(e => e.ItemTemplateId).IsFixedLength(); entity.Property(e => e.ItemId).IsFixedLength(); @@ -1763,6 +1892,14 @@ public class PeisDbContext : builder.Entity(entity => { entity.HasComment("项目类别设置"); + entity.Property(t => t.DisplayName).HasComment("名称"); + entity.Property(t => t.SimpleCode).HasComment("自定义简码"); + entity.Property(t => t.ParentId).HasComment("父id"); + entity.Property(t => t.PathCode).HasComment("路径编码"); + entity.Property(t => t.IsMergeAsbitem).HasComment("合并组合项目,Y-是,N-否"); + entity.Property(t => t.CheckTypeFlag).HasComment("检查类别,0-普通检查,1-检验,2-影像检查"); + entity.Property(t => t.GuidTypeId).HasComment("指引类别"); + entity.Property(t => t.MedicalReportTypeId).HasComment("体检报告类别"); entity.Property(e => e.Id).IsFixedLength(); @@ -1798,6 +1935,17 @@ public class PeisDbContext : builder.Entity(entity => { entity.HasComment("检验申请单"); + entity.Property(t => t.PatientRegisterId).HasComment("病人登记ID"); + entity.Property(t => t.LisRequestNo).HasComment("检验申请单号"); + entity.Property(t => t.SampleTypeId).HasComment("标本类型"); + entity.Property(t => t.SampleContainerId).HasComment("标本容器编号"); + entity.Property(t => t.IsPrint).HasComment("是否已打印"); + entity.Property(t => t.Sampler).HasComment("采样人姓名"); + entity.Property(t => t.SamplingTime).HasComment("采样时间"); + entity.Property(t => t.IsSignIn).HasComment("是签收"); + entity.Property(t => t.SignInOrder).HasComment("签收顺序"); + entity.Property(t => t.SignInPerson).HasComment("签收人姓名"); + entity.Property(t => t.SignInTime).HasComment("签收时间"); entity.Property(e => e.Id).ValueGeneratedNever(); @@ -1931,6 +2079,7 @@ public class PeisDbContext : .HasName("pk_medical_package_detail"); entity.HasComment("体检套餐包含的组合项目设置"); + entity.Property(t => t.AsbitemId).HasComment("组合项目编号"); entity.Property(e => e.MedicalPackageId).IsFixedLength(); @@ -1952,6 +2101,7 @@ public class PeisDbContext : builder.Entity(entity => { entity.HasComment("体检报告类别设置"); + entity.Property(t => t.DisplayName).HasComment("名称"); entity.Property(e => e.Id).IsFixedLength(); @@ -2039,7 +2189,7 @@ public class PeisDbContext : builder.Entity(entity => { - entity.HasComment("操作日志"); + entity.HasComment("操作日志,已经废弃"); entity.Property(e => e.Id).ValueGeneratedNever(); @@ -2053,6 +2203,9 @@ public class PeisDbContext : entity.HasComment("体检中心单位权限"); + entity.Property(t => t.CustomerOrgId).HasComment("客户单位编号"); + entity.Property(t => t.OrganizationUnitId).HasComment("体检中心编号"); + entity.Property(e => e.CustomerOrgId).IsFixedLength(); entity.Property(e => e.OrganizationUnitId).IsFixedLength(); @@ -2077,6 +2230,25 @@ public class PeisDbContext : { entity.HasComment("体检人员档案"); + entity.HasIndex(c=>c.PatientNo).IsUnique(); //配置唯一索引 + + entity.Property(e => e.PatientNo).HasComment("档案号"); + + + entity.Property(t => t.PatientPassword).HasComment("登录密码"); + entity.Property(t => t.DisplayName).HasComment("姓名"); + entity.Property(t => t.SexId).HasComment("性别"); + entity.Property(t => t.MaritalStatusId).HasComment("婚姻状况"); + entity.Property(t => t.BirthDate).HasComment("出生日期"); + entity.Property(t => t.NationId).HasComment("民族编号"); + entity.Property(t => t.BirthPlaceId).HasComment("出生地"); + entity.Property(t => t.IdNo).HasComment("身份证号"); + entity.Property(t => t.PostalCode).HasComment("邮政编码"); + entity.Property(t => t.Email).HasComment("email"); + entity.Property(t => t.Telephone).HasComment("电话"); + entity.Property(t => t.MobileTelephone).HasComment("手机号"); + entity.Property(t => t.Address).HasComment("地址"); + entity.Property(e => e.BirthPlaceId).IsFixedLength(); //entity.Property(e => e.LastModificationTime).HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); @@ -2162,15 +2334,7 @@ public class PeisDbContext : .IsFixedLength() .HasComment("单位编号"); - entity.Property(e => e.InterposeMeasure).HasComment("干预措施"); - - entity.Property(e => e.IsMedicalStart).HasComment("体检开始标志"); - - entity.Property(e => e.JobCardNo).HasComment("工卡号"); - - entity.Property(e => e.JobPost).HasComment("职务"); - - entity.Property(e => e.JobTitle).HasComment("职称"); + entity.Property(e => e.MaritalStatusId) .HasDefaultValueSql("'0'::bpchar") @@ -2194,29 +2358,56 @@ public class PeisDbContext : .IsFixedLength() .HasComment("体检类别"); - entity.Property(e => e.PatientId).HasComment("档案号"); - - entity.Property(e => e.PatientName).HasComment("姓名"); - - entity.Property(e => e.PatientRegisterNo).HasComment("条码号"); + entity.Property(e => e.PersonnelTypeId) .IsFixedLength() .HasComment("人员类别"); - entity.Property(e => e.Photo).HasComment("照片"); - - entity.Property(e => e.ReportPrintTimes).HasComment("体检报告打印次数"); - - entity.Property(e => e.Salesman).HasComment("介绍人"); - - entity.Property(e => e.SexHormoneTermId).IsFixedLength(); - - entity.Property(e => e.SexId).HasComment("性别"); - entity.Property(e => e.SummaryDate).HasComment("总检日期"); + entity.Property(t => t.PatientRegisterNo).HasComment("条码号"); + entity.Property(t => t.PatientId).HasComment("档案号"); + entity.Property(t => t.MedicalTimes).HasComment("体检次数"); + entity.Property(t => t.CustomerOrgId).HasComment("单位编号"); + entity.Property(t => t.CustomerOrgGroupId).HasComment("分组"); + entity.Property(t => t.MedicalPackageId).HasComment("套餐"); + entity.Property(t => t.PatientName).HasComment("姓名"); + entity.Property(t => t.SexId).HasComment("性别"); + entity.Property(t => t.BirthDate).HasComment("出生日期"); + entity.Property(t => t.Age).HasComment("年龄"); + entity.Property(t => t.JobCardNo).HasComment("工卡号"); + entity.Property(t => t.MedicalCardNo).HasComment("体检卡号"); + entity.Property(t => t.MaritalStatusId).HasComment("婚姻状况"); + entity.Property(t => t.MedicalTypeId).HasComment("体检类别"); + entity.Property(t => t.PersonnelTypeId).HasComment("人员类别"); + entity.Property(t => t.JobPost).HasComment("职务"); + entity.Property(t => t.JobTitle).HasComment("职称"); + entity.Property(t => t.Photo).HasComment("照片"); + entity.Property(t => t.Salesman).HasComment("介绍人"); + entity.Property(t => t.SexHormoneTermId).HasComment("性激素期限"); + entity.Property(t => t.InterposeMeasure).HasComment("干预措施"); + entity.Property(t => t.MedicalConclusionId).HasComment("体检结论"); + entity.Property(t => t.ReportPrintTimes).HasComment("体检报告打印次数"); + entity.Property(t => t.IsUpload).HasComment("是否上传到WEB"); + entity.Property(t => t.CompleteFlag).HasComment("完成标志"); + entity.Property(t => t.IsMedicalStart).HasComment("体检开始标志"); + entity.Property(t => t.MedicalStartDate).HasComment("体检开始日期"); + entity.Property(t => t.IsRecoverGuide).HasComment("指引单收回"); + entity.Property(t => t.SummaryDate).HasComment("总检日期"); + entity.Property(t => t.SummaryDoctor).HasComment("总检医生"); + entity.Property(t => t.IsAudit).HasComment("审核"); + entity.Property(t => t.AuditDoctor).HasComment("审核医生"); + entity.Property(t => t.AuditDate).HasComment("审核日期"); + entity.Property(t => t.IsLock).HasComment("锁住"); + entity.Property(t => t.IsNameHide).HasComment("隐藏姓名"); + entity.Property(t => t.IsPhoneFollow).HasComment("电话随访"); + entity.Property(t => t.IsVip).HasComment("vip客户"); + entity.Property(t => t.ThirdInfo).HasComment("附加第三方信息"); + entity.Property(t => t.GuidePrintTimes).HasComment("指引单打印次数"); + entity.Property(t => t.Remark).HasComment("备注"); + entity.Property(t => t.OrganizationUnitId).HasComment("体检中心ID"); + entity.Property(t => t.CustomerOrgRegisterId).HasComment("客户单位登记ID"); - entity.Property(e => e.SummaryDoctor).HasComment("总检医生"); entity.HasOne(d => d.CustomerOrgRegister) .WithMany(p => p.PatientRegisters) @@ -2242,6 +2433,8 @@ public class PeisDbContext : builder.Entity(entity => { + entity.HasComment("职业病-体检病人症状"); + entity.HasKey(e => new { e.PatientRegisterId, e.SymptomId }) .HasName("pk_patient_symptom"); @@ -2264,6 +2457,7 @@ public class PeisDbContext : builder.Entity(entity => { entity.HasComment("支付方式设置"); + entity.Property(t => t.Id).HasComment("编号,固定编码"); entity.Property(e => e.Id).IsFixedLength(); @@ -2298,6 +2492,10 @@ public class PeisDbContext : builder.Entity(entity => { entity.HasComment("电话随访"); + entity.Property(t => t.PatientRegisterId).HasComment("病人登记ID"); + entity.Property(t => t.FollowContent).HasComment("随访内容"); + entity.Property(t => t.ReplyContent).HasComment("回复内容"); + entity.Property(t => t.FollowUpPlanId).HasComment("随访计划ID"); entity.Property(e => e.Id).ValueGeneratedNever(); @@ -2390,6 +2588,11 @@ public class PeisDbContext : { entity.HasComment("价表项目设置"); + entity.Property(t => t.InvoiceItemTypeId).HasComment("发票项目类别ID"); + entity.Property(t => t.PriceItemCode).HasComment("价表编码"); + entity.Property(t => t.DisplayName).HasComment("名称"); + entity.Property(t => t.Price).HasComment("价格"); + entity.Property(e => e.Id).IsFixedLength(); //entity.Property(e => e.CreationTime).HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); @@ -2407,7 +2610,9 @@ public class PeisDbContext : builder.Entity(entity => { - entity.HasComment("主键产生器"); + entity.HasComment("主键产生器,废弃"); + entity.Property(t => t.DateString).HasComment("日期"); + entity.Property(t => t.SerialNo).HasComment("序列号"); entity.Property(e => e.Id).HasComment("主键编号"); @@ -2434,6 +2639,12 @@ public class PeisDbContext : builder.Entity(entity => { entity.HasComment("排队登记"); + entity.Property(t => t.PatientRegisterId).HasComment("病人登记ID"); + entity.Property(t => t.RoomId).HasComment("房间ID"); + entity.Property(t => t.CompleteFlag).HasComment("完成标志"); + entity.Property(t => t.NoCompleteReason).HasComment("未完成原因"); + entity.Property(t => t.DisplayOrder).HasComment("排队顺序"); + entity.Property(t => t.CallTime).HasComment("叫号时间"); entity.Property(e => e.Id).ValueGeneratedNever(); @@ -2457,6 +2668,8 @@ public class PeisDbContext : { entity.HasComment("项目参考范围设置"); + entity.Property(t => t.ReferenceRangeTypeFlag).HasComment("参考范围类别0-无参考范围,1-数字型,2-字符型,3-性激素"); + entity.Property(e => e.Id) .IsFixedLength() .HasComment("参考范围编号"); @@ -2526,6 +2739,19 @@ public class PeisDbContext : entity.Property(e => e.StandardPrice).HasComment("标准价格"); + + entity.Property(t => t.RegisterCheckId).HasComment("检查单ID"); + entity.Property(t => t.AsbitemId).HasComment("组合项目"); + entity.Property(t => t.PatientRegisterId).HasComment("登记流水号"); + entity.Property(t => t.StandardPrice).HasComment("标准价格"); + entity.Property(t => t.ChargePrice).HasComment("实收价格"); + entity.Property(t => t.PayTypeFlag).HasComment("支付方式,比如是自费、免费、单位支付"); + entity.Property(t => t.IsCharge).HasComment("是否已收费"); + entity.Property(t => t.LisRequestId).HasComment("LIS申请ID"); + entity.Property(t => t.Amount).HasComment("数量"); + entity.Property(t => t.RegisterAsbitemId).HasComment("主键"); + + entity.HasOne(d => d.Asbitem) .WithMany(p => p.RegisterAsbitems) .HasForeignKey(d => d.AsbitemId) @@ -2549,6 +2775,23 @@ public class PeisDbContext : builder.Entity(entity => { entity.HasComment("登记检查单"); + entity.Property(t => t.CheckRequestNo).HasComment("检查单号"); + entity.Property(t => t.ThirdInfo).HasComment("第三方信息"); + entity.Property(t => t.IsLock).HasComment("是否锁住"); + entity.Property(t => t.CompleteFlag).HasComment("完成标志"); + entity.Property(t => t.CheckRequestPrintTimes).HasComment("检查申请单打印次数"); + entity.Property(t => t.CriticalValue).HasComment("危急值"); + entity.Property(t => t.CriticalValueFlag).HasComment("危急值标志"); + entity.Property(t => t.CriticalValueProcessContent).HasComment("危急值处理内容"); + entity.Property(t => t.CriticalValueProcessFlag).HasComment("危急值处理标志"); + entity.Property(t => t.CriticalValueProcessDoctor).HasComment("危急值处理医生"); + entity.Property(t => t.CriticalValueProcessDate).HasComment("危急值处理日期"); + entity.Property(t => t.CriticalValueCreateDate).HasComment("危急值创建日期"); + entity.Property(t => t.CheckDoctorId).HasComment("检查医生ID"); + entity.Property(t => t.CheckDate).HasComment("检查日期"); + entity.Property(t => t.IsAudit).HasComment("是审核"); + entity.Property(t => t.AuditorUserId).HasComment("审核医生ID"); + entity.Property(t => t.AuditTime).HasComment("审核时间"); entity.Property(e => e.Id).ValueGeneratedNever(); @@ -2564,6 +2807,12 @@ public class PeisDbContext : builder.Entity(entity => { entity.HasComment("检查危急值"); + entity.Property(t => t.RegisterCheckId).HasComment("登记检查ID"); + entity.Property(t => t.ItemId).HasComment("项目编号"); + entity.Property(t => t.CriticalValue).HasComment("危急值"); + entity.Property(t => t.ProcessTypeFlag).HasComment("处理类别标志"); + entity.Property(t => t.IsComplete).HasComment("是否完成"); + entity.Property(t => t.Doctor).HasComment("处理医生"); entity.Property(e => e.Id).ValueGeneratedNever(); @@ -2580,20 +2829,23 @@ public class PeisDbContext : entity.HasComment("检查明细项目记录"); entity.Property(e => e.ItemId) - .IsFixedLength() - .HasComment("项目"); - - entity.Property(e => e.CheckDate).HasComment("检查日期"); - - entity.Property(e => e.CheckDoctorName).HasComment("检查医生"); + .IsFixedLength(); + entity.Property(e => e.ReferenceRangeValue) - .HasDefaultValueSql("''::character varying") - .HasComment("参考范围"); + .HasDefaultValueSql("''::character varying"); - entity.Property(e => e.Result).HasComment("结果"); + - entity.Property(e => e.ResultStatusId).HasComment("报告单提示"); + entity.Property(t => t.ItemId).HasComment("项目编号"); + entity.Property(t => t.Result).HasComment("结果"); + entity.Property(t => t.Unit).HasComment("单位"); + entity.Property(t => t.ReferenceRangeValue).HasComment("参考范围"); + entity.Property(t => t.CriticalRangeValue).HasComment("危急值范围"); + entity.Property(t => t.CriticalValue).HasComment("危急值"); + entity.Property(t => t.ResultStatusId).HasComment("报告单提示"); + entity.Property(t => t.CheckDoctorName).HasComment("检查医生"); + entity.Property(t => t.CheckDate).HasComment("检查日期"); entity.HasOne(d => d.Item) .WithMany(p => p.RegisterCheckItems) @@ -2644,6 +2896,9 @@ public class PeisDbContext : builder.Entity(entity => { entity.HasComment("登记检查建议"); + entity.Property(t => t.RegisterCheckId).HasComment("登记检查ID"); + entity.Property(t => t.Suggestion).HasComment("建议"); + entity.Property(t => t.DisplayOrder).HasComment("显示顺序"); entity.Property(e => e.Id).ValueGeneratedNever(); @@ -2658,6 +2913,10 @@ public class PeisDbContext : builder.Entity(entity => { entity.HasComment("登记检查综述"); + entity.Property(t => t.RegisterCheckId).HasComment("登记检查ID"); + entity.Property(t => t.Summary).HasComment("综述"); + entity.Property(t => t.DisplayOrder).HasComment("顺序"); + entity.Property(t => t.SummaryFlag).HasComment("综述标志"); entity.Property(e => e.Id).ValueGeneratedNever(); @@ -2673,6 +2932,13 @@ public class PeisDbContext : { entity.HasComment("结果状态设置"); + entity.Property(t => t.DataInputPrompt).HasComment("数据录入提示"); + entity.Property(t => t.ReportPrompt).HasComment("报告单提示"); + entity.Property(t => t.ReportBackgroundColor).HasComment("报告单背景颜色"); + entity.Property(t => t.ReportFontColor).HasComment("报告单字体颜色"); + entity.Property(t => t.DataInputBackgroundColor).HasComment("数据录入报告单颜色"); + entity.Property(t => t.DataInputFontColor).HasComment("数据录入字体颜色"); + entity.Property(e => e.Id).ValueGeneratedNever(); entity.Property(e => e.DataInputBackgroundColor).HasDefaultValueSql("16777215"); @@ -2690,6 +2956,9 @@ public class PeisDbContext : { entity.HasComment("房间设置"); + entity.Property(t => t.ItemTypeId).HasComment("项目类别编号"); + entity.Property(t => t.DepartmentId).HasComment(""); + entity.Property(e => e.Id).IsFixedLength(); //entity.Property(e => e.CreationTime).HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); @@ -2736,6 +3005,10 @@ public class PeisDbContext : { entity.HasComment("标本容器设置"); + entity.Property(t => t.ContainerColorName).HasComment("颜色名"); + entity.Property(t => t.ContainerColor).HasComment("颜色"); + + entity.Property(e => e.Id).IsFixedLength(); //entity.Property(e => e.CreationTime).HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); @@ -2747,6 +3020,9 @@ public class PeisDbContext : { entity.HasComment("标本分组设置"); + entity.Property(t => t.SampleTypeId).HasComment("标本类型ID"); + entity.Property(t => t.SampleContainerId).HasComment("标本容器ID"); + entity.Property(e => e.Id).IsFixedLength(); //entity.Property(e => e.CreationTime).HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); @@ -2777,6 +3053,8 @@ public class PeisDbContext : entity.HasComment("标本分组包含组合项目设置"); + entity.Property(t => t.AsbitemId).HasComment("组合项目编号"); + entity.Property(e => e.SampleGroupId).IsFixedLength(); entity.Property(e => e.AsbitemId).IsFixedLength(); @@ -2841,6 +3119,9 @@ public class PeisDbContext : builder.Entity(entity => { entity.HasComment("结账"); + entity.Property(t => t.IsComplete).HasComment("是完成"); + entity.Property(t => t.CompletedBy).HasComment("结账人"); + entity.Property(t => t.CompletedTime).HasComment("结账时间"); entity.Property(e => e.Id).ValueGeneratedNever(); @@ -2861,6 +3142,14 @@ public class PeisDbContext : builder.Entity(entity => { entity.HasComment("性激素参考范围设置"); + entity.Property(t => t.ItemId).HasComment("项目编号"); + entity.Property(t => t.SexHormoneTermId).HasComment("性激素期限ID"); + entity.Property(t => t.AgeLowerLimit).HasComment("年龄下限"); + entity.Property(t => t.AgeUpperLimit).HasComment("年龄上限"); + entity.Property(t => t.ReferenceRangeValue).HasComment("参考范围"); + entity.Property(t => t.CriticalRangeValue).HasComment("危急值参考范围"); + entity.Property(t => t.LowerDiagnosisId).HasComment("下限诊断"); + entity.Property(t => t.UpperDiagnosisId).HasComment("上限诊断"); entity.Property(e => e.Id).IsFixedLength(); @@ -2898,6 +3187,15 @@ public class PeisDbContext : builder.Entity(entity => { + entity.HasComment("短信发送"); + entity.Property(t => t.SmsTypeId).HasComment("短信类别ID"); + entity.Property(t => t.FollowUpPlanId).HasComment("随访计划ID"); + entity.Property(t => t.PatientId).HasComment("人员ID"); + entity.Property(t => t.PatientName).HasComment("姓名"); + entity.Property(t => t.MobileTelephone).HasComment("手机号"); + entity.Property(t => t.Content).HasComment("短信内容"); + entity.Property(t => t.IsComplete).HasComment("是完成"); + entity.Property(e => e.Id).ValueGeneratedNever(); entity.Property(e => e.SmsTypeId).IsFixedLength(); @@ -2907,6 +3205,10 @@ public class PeisDbContext : builder.Entity(entity => { + entity.HasComment("短信模板"); + entity.Property(t => t.SmsTypeId).HasComment("短信类别ID"); + entity.Property(t => t.Content).HasComment("短信内容"); + entity.Property(e => e.Id).IsFixedLength(); entity.Property(e => e.SmsTypeId).IsFixedLength(); @@ -2916,6 +3218,8 @@ public class PeisDbContext : builder.Entity(entity => { + entity.HasComment("短信类别"); + entity.Property(e => e.Id).IsFixedLength(); entity.ConfigureByConvention(); @@ -2924,6 +3228,8 @@ public class PeisDbContext : builder.Entity(entity => { entity.HasComment("建议设置"); + entity.Property(t => t.DiagnosisId).HasComment("诊断ID"); + entity.Property(t => t.SuggestionContent).HasComment("建议内容"); entity.Property(e => e.Id).IsFixedLength(); @@ -2945,6 +3251,9 @@ public class PeisDbContext : .HasName("pk_summary_diagnosis"); entity.HasComment("总检诊断"); + entity.Property(t => t.PatientRegisterId).HasComment("病人登记ID"); + entity.Property(t => t.DiagnosisId).HasComment("诊断ID"); + entity.Property(t => t.SumSuggestionHeaderId).HasComment("建议头ID"); entity.Property(e => e.DiagnosisId).IsFixedLength(); @@ -2965,6 +3274,8 @@ public class PeisDbContext : builder.Entity(entity => { entity.HasComment("总检建议内容"); + entity.Property(t => t.SumSuggestionHeaderId).HasComment("建议头ID"); + entity.Property(t => t.SuggestionContent).HasComment("建议内容"); entity.Property(e => e.Id).ValueGeneratedNever(); @@ -2979,6 +3290,9 @@ public class PeisDbContext : builder.Entity(entity => { entity.HasComment("总检建议头"); + entity.Property(t => t.PatientRegisterId).HasComment("病人登记ID"); + entity.Property(t => t.SuggestionTitle).HasComment("建议标题"); + entity.Property(t => t.SuggestionFlag).HasComment("建议标志"); entity.Property(e => e.Id).ValueGeneratedNever(); @@ -2993,6 +3307,8 @@ public class PeisDbContext : builder.Entity(entity => { entity.HasComment("总检综述内容"); + entity.Property(t => t.SumSummaryHeaderId).HasComment("建议头ID"); + entity.Property(t => t.SummaryContent).HasComment("建议内容"); entity.Property(e => e.Id).ValueGeneratedNever(); @@ -3007,6 +3323,9 @@ public class PeisDbContext : builder.Entity(entity => { entity.HasComment("总检综述头"); + entity.Property(t => t.PatientRegisterId).HasComment("病人登记ID"); + entity.Property(t => t.SummaryTitle).HasComment("综述标题"); + entity.Property(t => t.SummaryFlag).HasComment("综述标志"); entity.Property(e => e.Id).ValueGeneratedNever(); @@ -3021,6 +3340,7 @@ public class PeisDbContext : builder.Entity(entity => { entity.HasComment("综述模板设置"); + entity.Property(t => t.TemplateContent).HasComment("模板内容"); entity.Property(e => e.Id).IsFixedLength(); @@ -3053,6 +3373,10 @@ public class PeisDbContext : builder.Entity(entity => { entity.HasComment("系统参数设置"); + entity.Property(t => t.SysParmTypeId).HasComment("参数类别ID"); + entity.Property(t => t.DisplayName).HasComment("参数名"); + entity.Property(t => t.Remark).HasComment("备注"); + entity.Property(t => t.ValueType).HasComment("结果类别"); //entity.Property(e => e.LastModificationTime).HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); entity.HasOne(d => d.SysParmType) @@ -3067,6 +3391,7 @@ public class PeisDbContext : builder.Entity(entity => { entity.HasComment("系统参数类别设置"); + entity.Property(t => t.ParentId).HasComment("父ID"); //entity.Property(e => e.LastModificationTime).HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); @@ -3079,6 +3404,10 @@ public class PeisDbContext : .HasName("pk_sys_parm_value"); entity.HasComment("系统参数值设置"); + entity.Property(t => t.SysParmId).HasComment("参数ID"); + entity.Property(t => t.OrganizationUnitId).HasComment("单位ID"); + entity.Property(t => t.ParmValue).HasComment("参数值"); + entity.Property(t => t.Remark).HasComment("备注"); entity.Property(e => e.OrganizationUnitId).IsFixedLength(); @@ -3097,6 +3426,8 @@ public class PeisDbContext : .HasName("pk_sys_parm_value_option"); entity.HasComment("系统参数可选值设置"); + entity.Property(t => t.ValueOption).HasComment("可选项"); + entity.Property(t => t.ValueOptionName).HasComment("可选项名"); entity.Property(e => e.DisplayOrder).HasDefaultValueSql("1"); @@ -3111,6 +3442,7 @@ public class PeisDbContext : builder.Entity(entity => { + entity.HasComment("不是本软件的表,估计是系统自动生成的"); //entity.HasKey(e => e.Id) // .HasName("pk__sysdiagr__c2b05b611313aba2"); entity.ConfigureByConvention(); @@ -3152,6 +3484,10 @@ public class PeisDbContext : builder.Entity(entity => { + + entity.HasComment("用户表,废弃"); + entity.Property(t => t.UserTypeFlag).HasComment("用户类型"); + //entity.Property(e => e.CreatedDate).HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); entity.Property(e => e.DepartmentId).IsFixedLength(); @@ -3176,7 +3512,7 @@ public class PeisDbContext : entity.HasKey(e => new { e.UserId, e.DepartmentId }) .HasName("pk_user_operate_department"); - entity.HasComment("用户科室操作权限"); + entity.HasComment("用户科室操作权限,废弃"); entity.Property(e => e.DepartmentId).IsFixedLength(); @@ -3195,6 +3531,8 @@ public class PeisDbContext : builder.Entity(entity => { + entity.HasComment("用户组权限-废弃"); + entity.HasKey(e => new { e.UserId, e.GroupingId }) .HasName("pk_user_grouping"); @@ -3213,10 +3551,13 @@ public class PeisDbContext : builder.Entity(entity => { + + entity.HasKey(e => new { e.UserId, e.ItemTypeId }) .HasName("pk_user_item_type"); entity.HasComment("用户项目类别权限设置"); + entity.Property(t => t.ItemTypeId).HasComment("项目类别ID"); entity.Property(e => e.ItemTypeId).IsFixedLength(); @@ -3235,6 +3576,7 @@ public class PeisDbContext : builder.Entity(entity => { + entity.HasComment("用户控件权限-废弃"); entity.HasKey(e => new { e.Application, e.WindowName, e.ControlName, e.UserId, e.IsUser }) .HasName("pk_sys_function"); }); diff --git a/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230619080014_sss1.Designer.cs b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230619080014_sss1.Designer.cs new file mode 100644 index 00000000..484f7a39 --- /dev/null +++ b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230619080014_sss1.Designer.cs @@ -0,0 +1,10697 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; +using Shentun.Peis.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Shentun.Peis.Migrations +{ + [DbContext(typeof(PeisDbContext))] + [Migration("20230619080014_sss1")] + partial class sss1 + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.PostgreSql) + .HasAnnotation("ProductVersion", "6.0.5") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("AsbitemRoom", b => + { + b.Property("AsbitemId") + .HasColumnType("uuid"); + + b.Property("RoomId") + .HasColumnType("uuid"); + + b.HasKey("AsbitemId", "RoomId"); + + b.ToTable("AsbitemRoom"); + }); + + modelBuilder.Entity("ChildDiagnosis", b => + { + b.Property("ParentDiagnosisId") + .HasMaxLength(8) + .HasColumnType("uuid") + .HasColumnName("parent_diagnosis_id") + .IsFixedLength(); + + b.Property("DiagnosisId") + .HasMaxLength(8) + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength(); + + b.HasKey("ParentDiagnosisId", "DiagnosisId") + .HasName("pk_child_diagnosis"); + + b.HasIndex("DiagnosisId"); + + b.ToTable("child_diagnosis", (string)null); + + b.HasComment("子诊断"); + }); + + modelBuilder.Entity("DiagnosisDiagnosis", b => + { + b.Property("DiagnosisId") + .HasColumnType("uuid"); + + b.Property("ParentDiagnosisId") + .HasColumnType("uuid"); + + b.HasKey("DiagnosisId", "ParentDiagnosisId"); + + b.ToTable("DiagnosisDiagnosis"); + }); + + modelBuilder.Entity("RoomAsbitem", b => + { + b.Property("RoomId") + .HasMaxLength(5) + .HasColumnType("uuid") + .HasColumnName("room_id") + .IsFixedLength(); + + b.Property("AsbitemId") + .HasMaxLength(6) + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength(); + + b.HasKey("RoomId", "AsbitemId") + .HasName("pk_room_asbitem"); + + b.HasIndex("AsbitemId"); + + b.ToTable("room_asbitem", (string)null); + + b.HasComment("房间包含组合项目设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.HelloA", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ADesc") + .HasColumnType("text") + .HasColumnName("a_desc"); + + b.Property("AName") + .ValueGeneratedOnAdd() + .HasColumnType("text") + .HasDefaultValue("默认值") + .HasColumnName("a_name"); + + b.Property("AddTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("add_time") + .HasDefaultValueSql("now()"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("HelloTypeId") + .HasColumnType("uuid") + .HasColumnName("hello_type_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("HelloTypeId"); + + b.ToTable("hello_a"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.HelloType", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("TypeName") + .HasColumnType("text") + .HasColumnName("type_name") + .HasComment("类型名称"); + + b.HasKey("Id"); + + b.ToTable("hello_type"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.Student", b => + { + b.Property("Sid") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("sid"); + + b.Property("Cid") + .HasColumnType("text"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasColumnType("text"); + + b.Property("Uid") + .HasColumnType("uuid"); + + b.HasKey("Sid"); + + b.ToTable("student"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.TestA", b => + { + b.Property("AId") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("AName") + .HasColumnType("text"); + + b.HasKey("AId"); + + b.ToTable("testa"); + + b.HasComment("组合项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.TestB", b => + { + b.Property("BId") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("AId") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("AName") + .HasColumnType("text"); + + b.Property("TestAsAId") + .HasColumnType("uuid"); + + b.HasKey("BId"); + + b.HasIndex("TestAsAId"); + + b.ToTable("testb"); + + b.HasComment("组合项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Asbitem", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("ClinicalMeaning") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("clinical_meaning") + .HasComment("临床意义"); + + b.Property("CreationTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DefaultResult") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("default_result") + .HasComment("默认结果"); + + b.Property("DeviceTypeId") + .HasColumnType("uuid") + .HasColumnName("device_type_id") + .IsFixedLength() + .HasComment("仪器类别"); + + b.Property("DiagnosisFunction") + .HasMaxLength(1000) + .HasColumnType("character varying(1000)") + .HasColumnName("diagnosis_function") + .HasComment("诊断函数"); + + b.Property("DisplayName") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar") + .HasComment("适用性别,M-男,F-女,A-全部"); + + b.Property("InvoiceItemTypeId") + .HasColumnType("uuid") + .HasColumnName("invoice_item_type_id") + .IsFixedLength() + .HasComment("发票类别"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active") + .HasComment("是启用"); + + b.Property("IsBeforeEat") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_before_eat") + .HasComment("餐前项目"); + + b.Property("IsCheck") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_check") + .HasComment("是检查项目"); + + b.Property("IsContinueProcess") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_continue_process") + .HasComment("诊断函数处理完毕后继续处理"); + + b.Property("IsDiagnosisFunction") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_diagnosis_function") + .HasComment("启用诊断函数"); + + b.Property("IsItemResultMerger") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_item_result_merger") + .HasComment("项目结果合并"); + + b.Property("IsPictureRotate") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_picture_rotate") + .HasComment("体检报告图片旋转90°"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength() + .HasComment("项目类别"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Price") + .HasPrecision(8, 2) + .HasColumnType("numeric(8,2)") + .HasColumnName("price") + .HasComment("价格"); + + b.Property("QueueTime") + .HasPrecision(3, 1) + .HasColumnType("numeric(3,1)") + .HasColumnName("queue_time") + .HasComment("候诊时间"); + + b.Property("ShortName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("short_name") + .HasComment("简称"); + + b.Property("SimpleCode") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("InvoiceItemTypeId"); + + b.HasIndex("ItemTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_asbitem") + .IsUnique(); + + b.ToTable("asbitem"); + + b.HasComment("组合项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.AsbitemDetail", b => + { + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength(); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength(); + + b.HasKey("AsbitemId", "ItemId") + .HasName("pk_department_asbitem_detail"); + + b.HasIndex("ItemId"); + + b.ToTable("asbitem_detail"); + + b.HasComment("组合项目包含项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.AsbitemGuide", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id") + .IsFixedLength(); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength(); + + b.Property("ForSexId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id"); + + b.Property("Guide") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("guide"); + + b.HasKey("OrganizationUnitId", "AsbitemId", "ForSexId") + .HasName("pk_department_asbitem_guide"); + + b.ToTable("asbitem_guide"); + + b.HasComment("体检中心组和项目指引内容"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.AsbitemPriceItem", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("Amount") + .HasColumnType("smallint") + .HasColumnName("amount"); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PriceItemId") + .HasColumnType("uuid") + .HasColumnName("price_item_id") + .IsFixedLength(); + + b.HasKey("Id"); + + b.ToTable("asbitem_price_item"); + + b.HasComment("组和项目包含价表项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultConclusion", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("BigtextResultTemplateId") + .HasColumnType("uuid") + .HasColumnName("bigtext_result_template_id") + .IsFixedLength(); + + b.Property("Conclusion") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("conclusion"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("BigtextResultTemplateId"); + + b.ToTable("bigtext_result_conclusion"); + + b.HasComment("大文本结果结论"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultDescription", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("BigtextResultTemplateId") + .HasColumnType("uuid") + .HasColumnName("bigtext_result_template_id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("description"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("BigtextResultTemplateId"); + + b.ToTable("bigtext_result_description"); + + b.HasComment("大文本结果描述"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("BigtextResultTypeId") + .HasColumnType("uuid") + .HasColumnName("bigtext_result_type_id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("BigtextResultTypeId"); + + b.ToTable("bigtext_result_template"); + + b.HasComment("大文本结果模板"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength(); + + b.Property("PathCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("path_code"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("ItemTypeId"); + + b.ToTable("bigtext_result_type"); + + b.HasComment("大文本结果类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BirthPlace", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CountryCode") + .HasMaxLength(6) + .HasColumnType("character varying(6)") + .HasColumnName("country_code"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_birth_place") + .IsUnique(); + + b.ToTable("birth_place"); + + b.HasComment("出生地"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardBill", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("编号"); + + b.Property("BillFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("bill_flag") + .HasDefaultValueSql("'0'::bpchar") + .HasComment("记账标志"); + + b.Property("BillMoney") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("bill_money") + .HasComment("记账金额"); + + b.Property("CardRegisterId") + .HasColumnType("uuid") + .HasColumnName("card_register_id") + .HasComment("卡登记编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PayModeId") + .ValueGeneratedOnAdd() + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("pay_mode_id") + .HasDefaultValueSql("'1'::bpchar") + .IsFixedLength() + .HasComment("支付方式"); + + b.HasKey("Id"); + + b.HasIndex("CardRegisterId"); + + b.HasIndex("PayModeId"); + + b.ToTable("card_bill"); + + b.HasComment("卡记账记录"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardRegister", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("编号"); + + b.Property("CardFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("card_flag") + .HasDefaultValueSql("0") + .HasComment("使用标志"); + + b.Property("CardNo") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("card_no") + .HasComment("卡号"); + + b.Property("CardPassword") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("card_password"); + + b.Property("CardTypeId") + .HasColumnType("uuid") + .HasColumnName("card_type_id") + .IsFixedLength() + .HasComment("卡类型"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("customer_name") + .HasComment("领用者"); + + b.Property("Discount") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("discount") + .HasDefaultValueSql("100") + .HasComment("折扣"); + + b.Property("ExpiryDate") + .HasColumnType("date") + .HasColumnName("expiry_date") + .HasComment("有效期"); + + b.Property("IdNo") + .HasMaxLength(18) + .HasColumnType("character varying(18)") + .HasColumnName("id_no") + .HasComment("身份证号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MobileTelephone") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("mobile_telephone") + .HasComment("手机"); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id") + .IsFixedLength(); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("Telephone") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("telephone") + .HasComment("电话"); + + b.HasKey("Id"); + + b.HasIndex("CardTypeId"); + + b.HasIndex("OrganizationUnitId"); + + b.HasIndex(new[] { "CardNo", "CardFlag" }, "ix_card_register") + .IsUnique(); + + b.ToTable("card_register"); + + b.HasComment("会员卡登记"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("CardModeId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("card_mode_id") + .HasDefaultValueSql("0") + .HasComment("卡模式"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("Discount") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("discount") + .HasDefaultValueSql("100") + .HasComment("折扣"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("ExpiryDay") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("expiry_day") + .HasDefaultValueSql("3650") + .HasComment("有效期"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark") + .HasComment("备注"); + + b.HasKey("Id"); + + b.ToTable("card_type"); + + b.HasComment("会员卡类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Charge", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("收据号"); + + b.Property("ChargeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("charge_flag") + .HasDefaultValueSql("0"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("InvoiceNo") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("invoice_no"); + + b.Property("InvoiceOrgName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("invoice_org_name"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("登记流水号"); + + b.Property("SettleAccountId") + .HasColumnType("uuid") + .HasColumnName("settle_account_id"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "PatientRegisterId" }, "fki_fk_patient_register_charge"); + + b.HasIndex(new[] { "PatientRegisterId" }, "ix_charge"); + + b.ToTable("charge"); + + b.HasComment("收费主档"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeAsbitem", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Amount") + .HasColumnType("smallint") + .HasColumnName("amount"); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength() + .HasComment("组合项目"); + + b.Property("ChargeId") + .HasColumnType("uuid") + .HasColumnName("charge_id") + .HasComment("收据号"); + + b.Property("ChargePrice") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_price") + .HasComment("价格"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("RegisterAsbitemId") + .HasColumnType("uuid") + .HasColumnName("register_asbitem_id"); + + b.HasKey("Id"); + + b.HasIndex("AsbitemId"); + + b.HasIndex("ChargeId"); + + b.ToTable("charge_asbitem"); + + b.HasComment("收费包含组合项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeBack", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("退费编号"); + + b.Property("ChargeId") + .HasColumnType("uuid") + .HasColumnName("charge_id") + .HasComment("收据号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SettleAccountId") + .HasColumnType("uuid") + .HasColumnName("settle_account_id"); + + b.HasKey("Id"); + + b.HasIndex("ChargeId"); + + b.ToTable("charge_back"); + + b.HasComment("退费主档"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeBackPay", b => + { + b.Property("ChargeBackId") + .HasColumnType("uuid") + .HasColumnName("charge_back_id"); + + b.Property("PayModeId") + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("pay_mode_id") + .IsFixedLength(); + + b.Property("BackMoeny") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("back_moeny"); + + b.HasKey("ChargeBackId", "PayModeId") + .HasName("pk_department_charge_back_pay"); + + b.HasIndex("PayModeId"); + + b.ToTable("charge_back_pay"); + + b.HasComment("退费支付方式"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargePay", b => + { + b.Property("ChargeId") + .HasColumnType("uuid") + .HasColumnName("charge_id") + .HasComment("收据号"); + + b.Property("PayModeId") + .ValueGeneratedOnAdd() + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("pay_mode_id") + .HasDefaultValueSql("'1'::bpchar") + .IsFixedLength() + .HasComment("支付方式"); + + b.Property("CardBillId") + .HasColumnType("uuid") + .HasColumnName("card_bill_id"); + + b.Property("ChargeMoney") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_money") + .HasComment("金额"); + + b.HasKey("ChargeId", "PayModeId") + .HasName("pk_department_charge_pay"); + + b.HasIndex("PayModeId"); + + b.ToTable("charge_pay"); + + b.HasComment("收费支付方式"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargePriceItem", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Amount") + .HasColumnType("smallint") + .HasColumnName("amount"); + + b.Property("ChargeAsbitemId") + .HasColumnType("uuid") + .HasColumnName("charge_asbitem_id"); + + b.Property("ChargePrice") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_price"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PriceItemId") + .HasColumnType("uuid") + .HasColumnName("price_item_id"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "ChargeAsbitemId" }, "fki_fk_charge_asbitem"); + + b.HasIndex(new[] { "ChargeAsbitemId", "PriceItemId" }, "ix_charge_price_item"); + + b.ToTable("charge_price_item"); + + b.HasComment("收费价表项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CommonChar", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CommonCharTypeId") + .HasColumnType("uuid") + .HasColumnName("common_char_type_id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(1) + .HasColumnType("character varying(1)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(1) + .HasColumnType("character varying(1)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("CommonCharTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_common_char") + .IsUnique(); + + b.ToTable("common_char"); + + b.HasComment("常用字符"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CommonCharType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_common_char_type") + .IsUnique(); + + b.ToTable("common_char_type"); + + b.HasComment("常用字符类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ContactMethod", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ContactMethodType") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("contact_method_type") + .HasDefaultValueSql("'M'::bpchar"); + + b.Property("ContactMethodValue") + .HasMaxLength(15) + .HasColumnType("character varying(15)") + .HasColumnName("contact_method_value"); + + b.Property("ContactPersonId") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("ContactPersonId"); + + b.ToTable("contact_method"); + + b.HasComment("联系方式"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ContactPerson", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgId") + .HasColumnType("uuid") + .HasColumnName("customer_org_id") + .IsFixedLength(); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("Title") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("title"); + + b.HasKey("Id"); + + b.HasIndex("CustomerOrgId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_contact"); + + b.HasIndex(new[] { "SimpleCode" }, "ix_contact_simple_code"); + + b.ToTable("contact_person"); + + b.HasComment("联系人"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CriticalValue", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CriticalValueTypeId") + .HasColumnType("uuid") + .HasColumnName("critical_value_type_id") + .IsFixedLength(); + + b.Property("DisplayName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("CriticalValueTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_critical_value") + .IsUnique(); + + b.ToTable("critical_value"); + + b.HasComment("危急值关键字设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CriticalValueType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength(); + + b.Property("PathCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("path_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_critical_value_type") + .IsUnique(); + + b.ToTable("critical_value_type"); + + b.HasComment("危急值类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrg", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("单位ID"); + + b.Property("Accounts") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("accounts") + .HasComment("银行帐号"); + + b.Property("Address") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("address") + .HasComment("联系地址"); + + b.Property("Bank") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("bank") + .HasComment("业务银行"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("单位名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("Fax") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("fax") + .HasComment("传真"); + + b.Property("InvoiceName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("invoice_name"); + + b.Property("IsLock") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_lock"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OrgTypeId") + .HasColumnType("uuid") + .HasColumnName("org_type_id") + .IsFixedLength() + .HasComment("单位性质"); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength(); + + b.Property("PathCode") + .HasMaxLength(60) + .HasColumnType("character varying(60)") + .HasColumnName("path_code"); + + b.Property("PostalCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("postal_code") + .HasComment("邮政编码"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("ShortName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("short_name"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code") + .HasComment("拼音简码"); + + b.Property("StatusFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("status_flag") + .HasDefaultValueSql("0"); + + b.Property("Telephone") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("telephone") + .HasComment("联系电话"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "OrganizationUnitId" }, "fki_fk_customer_org_organization_units"); + + b.HasIndex(new[] { "ParentId", "DisplayName" }, "ix_org") + .IsUnique(); + + b.ToTable("customer_org"); + + b.HasComment("团检单位设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgCharge", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ChargeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("charge_flag"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgRegisterId") + .HasColumnType("uuid") + .HasColumnName("customer_org_register_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Payer") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("payer"); + + b.Property("SettleAccountId") + .HasColumnType("uuid") + .HasColumnName("settle_account_id"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "CustomerOrgRegisterId" }, "fki_fk_customer_org_charge_register"); + + b.ToTable("customer_org_charge"); + + b.HasComment("团检单位收费"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargeBack", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgChargeId") + .HasColumnType("uuid") + .HasColumnName("customer_org_charge_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SettleAccountId") + .HasColumnType("uuid") + .HasColumnName("settle_account_id"); + + b.HasKey("Id"); + + b.HasIndex("CustomerOrgChargeId"); + + b.ToTable("customer_org_charge_back"); + + b.HasComment("团检单位退费"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargeBackPay", b => + { + b.Property("CustomerOrgChargeBackId") + .HasColumnType("uuid") + .HasColumnName("customer_org_charge_back_id"); + + b.Property("PayModeId") + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("pay_mode_id") + .IsFixedLength(); + + b.Property("BackMoeny") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("back_moeny"); + + b.HasKey("CustomerOrgChargeBackId", "PayModeId") + .HasName("pk_org_charge_back_pay"); + + b.HasIndex("PayModeId"); + + b.ToTable("customer_org_charge_back_pay"); + + b.HasComment("团结退费支付方式"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargePay", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ChargeMoney") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_money"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PayModeId") + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("pay_mode_id") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("PayModeId"); + + b.ToTable("customer_org_charge_pay"); + + b.HasComment("团检收费支付方式"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgGroup", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("分组编号"); + + b.Property("AgeLowerLimit") + .HasColumnType("smallint") + .HasColumnName("age_lower_limit") + .HasComment("适用年龄下限"); + + b.Property("AgeUpperLimit") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasColumnName("age_upper_limit") + .HasDefaultValueSql("120") + .HasComment("适用年龄上限"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgRegisterId") + .HasColumnType("uuid") + .HasColumnName("customer_org_register_id"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("分组名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar") + .HasComment("适用性别"); + + b.Property("JobPost") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("job_post") + .HasComment("适用职务"); + + b.Property("JobTitle") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("job_title") + .HasComment("适用职称"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MaritalStatusId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("marital_status_id") + .HasComment("适用婚姻状况"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price") + .HasComment("价格"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark") + .HasComment("备注"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "CustomerOrgRegisterId" }, "fki_fk_customer_org_group_register"); + + b.ToTable("customer_org_group"); + + b.HasComment("团体分组主档"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgGroupDetail", b => + { + b.Property("CustomerOrgGroupId") + .HasColumnType("uuid") + .HasColumnName("customer_org_group_id") + .IsFixedLength(); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength(); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price"); + + b.HasKey("CustomerOrgGroupId", "AsbitemId") + .HasName("pk_org_group_detail"); + + b.HasIndex("AsbitemId"); + + b.ToTable("customer_org_group_detail"); + + b.HasComment("团检分组包含组合项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgRegister", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("BeginTime") + .ValueGeneratedOnAdd() + .HasColumnType("date") + .HasColumnName("begin_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)") + .HasComment("开始日期"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgId") + .HasColumnType("uuid") + .HasColumnName("customer_org_id") + .IsFixedLength() + .HasComment("单位编号"); + + b.Property("EndTime") + .HasColumnType("date") + .HasColumnName("end_time") + .HasComment("结束日期"); + + b.Property("IsComplete") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_complete") + .HasComment("完成标志"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MedicalTimes") + .HasColumnType("smallint") + .HasColumnName("medical_times") + .HasComment("单位体检次数"); + + b.Property("RegisterName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("register_name"); + + b.Property("RegisterNo") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("register_no"); + + b.HasKey("Id"); + + b.HasIndex("CustomerOrgId"); + + b.ToTable("customer_org_register"); + + b.HasComment("团检体检登记"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_org_type") + .IsUnique(); + + b.ToTable("customer_org_type"); + + b.HasComment("团体类型设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Department", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CodePrefix") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("code_prefix"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DepartmentTypeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("department_type_flag"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasMaxLength(4) + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength(); + + b.Property("PathCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("path_code"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName", "ParentId" }, "ix_department") + .IsUnique(); + + b.ToTable("department"); + + b.HasComment("部门"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DeviceType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("仪器类别编号"); + + b.Property("CheckTypeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("check_type_flag"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("仪器类别名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.ToTable("device_type"); + + b.HasComment("仪器类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Diagnosis", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DiagnosisLevelId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_level_id"); + + b.Property("DisplayName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar"); + + b.Property("IsIll") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_ill"); + + b.Property("IsSummaryTemplate") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_summary_template"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("simple_code"); + + b.Property("SuggestionName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("suggestion_name"); + + b.HasKey("Id"); + + b.HasIndex("DiagnosisLevelId"); + + b.HasIndex("ItemTypeId"); + + b.ToTable("diagnosis"); + + b.HasComment("诊断设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisLevel", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.ToTable("diagnosis_level"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisPostfix", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_diagnosis_postfix") + .IsUnique(); + + b.ToTable("diagnosis_postfix"); + + b.HasComment("诊断后缀设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_diagnosis_template") + .IsUnique(); + + b.ToTable("diagnosis_template"); + + b.HasComment("诊断模板设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisTemplateDetail", b => + { + b.Property("DiagnosisTemplateId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_template_id") + .IsFixedLength(); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength(); + + b.HasKey("DiagnosisTemplateId", "DiagnosisId") + .HasName("pk_diagnosis_template_detail"); + + b.HasIndex("DiagnosisId"); + + b.ToTable("diagnosis_template_detail"); + + b.HasComment("诊断模板包含明细"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength(); + + b.Property("PathCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("path_code"); + + b.HasKey("Id"); + + b.ToTable("diagnosis_type"); + + b.HasComment("诊断类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.FollowUpMode", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("smallint") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("follow_up_mode"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.FollowUpPlan", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Content") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("content"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CycleDays") + .HasColumnType("smallint") + .HasColumnName("cycle_days"); + + b.Property("DoctorUserId") + .HasColumnType("uuid") + .HasColumnName("doctor_user_id"); + + b.Property("FollowUpModeId") + .HasColumnType("uuid") + .HasColumnName("follow_up_mode_id") + .IsFixedLength(); + + b.Property("FollowUpTypeId") + .HasColumnType("uuid") + .HasColumnName("follow_up_type_id") + .IsFixedLength(); + + b.Property("IsLoop") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_loop"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PerfomFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("perfom_flag"); + + b.Property("PerfomTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("perfom_time"); + + b.Property("PerfomUserId") + .HasColumnType("uuid") + .HasColumnName("perfom_user_id"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark"); + + b.HasKey("Id"); + + b.ToTable("follow_up_plan"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.FollowUpType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("smallint") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("follow_up_type"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ForSex", b => + { + b.Property("Id") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("id"); + + b.Property("DisplayName") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("SimpleCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("for_sex"); + + b.HasComment("可支持性别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Grouping", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ModifiedDate") + .HasColumnType("date") + .HasColumnName("modified_date"); + + b.Property("Modifier") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("modifier"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_grouping") + .IsUnique(); + + b.ToTable("grouping"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.GuideType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("guide_type"); + + b.HasComment("指引类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.HealthCertificate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("登记流水号"); + + b.Property("CertificateDate") + .HasColumnType("date") + .HasColumnName("certificate_date") + .HasComment("发证日期"); + + b.Property("CertificateNo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("certificate_no") + .HasComment("证件编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ServiceOrg") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("service_org") + .HasComment("服务单位"); + + b.Property("ServiceTradesId") + .HasColumnType("smallint") + .HasColumnName("service_trades_id") + .HasComment("服务行业"); + + b.HasKey("Id"); + + b.ToTable("health_certificate"); + + b.HasComment("健康证办理"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ImportLisResult", b => + { + b.Property("LisRequestNo") + .HasColumnType("uuid") + .HasColumnName("lis_request_no") + .HasComment("条码号"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .HasComment("项目"); + + b.Property("CheckDoctorName") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("check_doctor_name") + .HasComment("检查医生"); + + b.Property("CheckTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("check_time") + .HasComment("检查日期"); + + b.Property("CriticalRangeValue") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("critical_range_value"); + + b.Property("ImportTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("import_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)") + .HasComment("导入日期"); + + b.Property("ItemName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("item_name"); + + b.Property("PatientRegisterNo") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("patient_register_no") + .HasComment("条码号"); + + b.Property("ReferenceRangeValue") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("reference_range_value") + .HasComment("参考范围"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("ReportPrompt") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("report_prompt") + .HasComment("报告单提示"); + + b.Property("Result") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("result") + .HasComment("结果"); + + b.Property("Unit") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("unit") + .HasComment("单位"); + + b.HasKey("LisRequestNo", "ItemId") + .HasName("pk_import_lis_result"); + + b.HasIndex(new[] { "PatientRegisterNo" }, "ix_import_lis_result"); + + b.ToTable("import_lis_result"); + + b.HasComment("检验结果中间表"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ImportPacsPicture", b => + { + b.Property("CheckRequestNo") + .HasColumnType("uuid") + .HasColumnName("check_request_no"); + + b.Property("PictureFilename") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("picture_filename") + .HasComment("检查部位"); + + b.Property("AsbitemNames") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("asbitem_names") + .HasComment("组合项目名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("诊断结论"); + + b.Property("ImportTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("import_time") + .HasComment("导入日期"); + + b.Property("IsPrint") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_print") + .HasComment("检查所见"); + + b.Property("PatientRegisterNo") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("patient_register_no"); + + b.HasKey("CheckRequestNo", "PictureFilename") + .HasName("pk_import_pacs_picture_1"); + + b.ToTable("import_pacs_picture"); + + b.HasComment("pacs图片中间表"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ImportPacsResult", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AsbitemNames") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("asbitem_names") + .HasComment("组合项目名称"); + + b.Property("CheckDoctorName") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("check_doctor_name") + .HasComment("检查医生"); + + b.Property("CheckItems") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("check_items") + .HasComment("检查部位"); + + b.Property("CheckTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("check_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)") + .HasComment("检查日期"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("character varying(1000)") + .HasColumnName("description") + .HasComment("检查所见"); + + b.Property("ImportTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("import_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)") + .HasComment("导入日期"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PatientRegisterNo") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("patient_register_no"); + + b.Property("Suggestion") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("suggestion") + .HasComment("建议"); + + b.Property("Summary") + .HasMaxLength(1000) + .HasColumnType("character varying(1000)") + .HasColumnName("summary") + .HasComment("诊断结论"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "PatientRegisterNo" }, "ix_import_pacs_result"); + + b.ToTable("import_pacs_result"); + + b.HasComment("PACS结果中间表"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.InvoiceItemType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_invoice_item_type") + .IsUnique(); + + b.ToTable("invoice_item_type"); + + b.HasComment("发票项目类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.InvoiceOrg", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_invoice_org") + .IsUnique(); + + b.ToTable("invoice_org"); + + b.HasComment("发票单位设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Item", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CalculationFunction") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("calculation_function"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DefaultResult") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("default_result"); + + b.Property("DiagnosisFunction") + .HasMaxLength(2000) + .HasColumnType("character varying(2000)") + .HasColumnName("diagnosis_function"); + + b.Property("DisplayName") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("EnglishShortName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("english_short_name"); + + b.Property("InputCheck") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("input_check"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active"); + + b.Property("IsCalculationItem") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_calculation_item"); + + b.Property("IsContinueProcess") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_continue_process"); + + b.Property("IsDiagnosisFunction") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_diagnosis_function"); + + b.Property("IsNameIntoSummary") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_name_into_summary"); + + b.Property("IsProduceSummary") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_produce_summary"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price"); + + b.Property("PriceItemId") + .HasMaxLength(8) + .HasColumnType("uuid") + .HasColumnName("price_item_id") + .IsFixedLength(); + + b.Property("ReferenceRangeTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("reference_range_type_flag") + .HasDefaultValueSql("'E'::bpchar"); + + b.Property("ResultTemplateTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("result_template_type_flag") + .HasDefaultValueSql("0"); + + b.Property("SimpleCode") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("simple_code"); + + b.Property("UnitId") + .HasColumnType("uuid") + .HasColumnName("unit_id") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("ItemTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_item") + .IsUnique(); + + b.ToTable("item"); + + b.HasComment("项目设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemDefaultResult", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_item_default_result") + .IsUnique(); + + b.ToTable("item_default_result"); + + b.HasComment("项目默认结果设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultMatch", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("结果匹配编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength() + .HasComment("诊断编号"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1") + .HasComment("显示顺序"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Result") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("result") + .HasComment("结果"); + + b.HasKey("Id"); + + b.HasIndex("DiagnosisId"); + + b.HasIndex("ItemId"); + + b.ToTable("item_result_match"); + + b.HasComment("结果匹配设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("结果模板编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength() + .HasComment("诊断编号"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("IsNameIntoSummary") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_name_into_summary") + .HasComment("小结前是否加名称"); + + b.Property("IsResultIntoSummary") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_result_into_summary"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Result") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("result") + .HasComment("结果"); + + b.Property("ResultStatusId") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("result_status_id") + .HasComment("结果状态"); + + b.Property("SimpleCode") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("simple_code") + .HasComment("拼音简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "ItemId", "Result" }, "ix_item_result_template") + .IsUnique(); + + b.ToTable("item_result_template"); + + b.HasComment("项目结果模板设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultTemplateType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "ItemId", "DisplayName" }, "ix_item_result_template_type") + .IsUnique(); + + b.ToTable("item_result_template_type"); + + b.HasComment("项目结果模板类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_item_template") + .IsUnique(); + + b.ToTable("item_template"); + + b.HasComment("项目模板设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemTemplateDetail", b => + { + b.Property("ItemTemplateId") + .HasColumnType("uuid") + .HasColumnName("item_template_id") + .IsFixedLength(); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength(); + + b.HasKey("ItemTemplateId", "ItemId") + .HasName("pk_item_template_detail"); + + b.HasIndex("ItemId"); + + b.ToTable("item_template_detail"); + + b.HasComment("项目模板明细"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CheckTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("check_type_flag") + .HasDefaultValueSql("'G'::bpchar"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("GuidTypeId") + .HasColumnType("uuid") + .HasColumnName("guid_type_id") + .IsFixedLength(); + + b.Property("IsMergeAsbitem") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_merge_asbitem"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MedicalReportTypeId") + .HasColumnType("uuid") + .HasColumnName("medical_report_type_id") + .IsFixedLength(); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength(); + + b.Property("PathCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("path_code"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("GuidTypeId"); + + b.HasIndex("MedicalReportTypeId"); + + b.HasIndex(new[] { "DisplayName", "ParentId" }, "ix_item_type") + .IsUnique(); + + b.ToTable("item_type"); + + b.HasComment("项目类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.LisRequest", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("IsPrint") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_print"); + + b.Property("IsSignIn") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_sign_in"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LisRequestNo") + .HasColumnType("uuid") + .HasColumnName("lis_request_no"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("SampleContainerId") + .HasColumnType("uuid") + .HasColumnName("sample_container_id") + .IsFixedLength(); + + b.Property("SampleTypeId") + .HasColumnType("uuid") + .HasColumnName("sample_type_id") + .IsFixedLength(); + + b.Property("Sampler") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("sampler"); + + b.Property("SamplingTime") + .HasColumnType("date") + .HasColumnName("sampling_time"); + + b.Property("SignInOrder") + .HasColumnType("integer") + .HasColumnName("sign_in_order"); + + b.Property("SignInPerson") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("sign_in_person"); + + b.Property("SignInTime") + .HasColumnType("date") + .HasColumnName("sign_in_time"); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.HasIndex("SampleContainerId"); + + b.HasIndex("SampleTypeId"); + + b.HasIndex(new[] { "LisRequestNo" }, "ix_lis_request") + .IsUnique(); + + b.ToTable("lis_request"); + + b.HasComment("检验申请单"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MaritalStatus", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("id") + .HasDefaultValueSql("'0'::bpchar") + .HasComment("婚姻状况编号"); + + b.Property("DisplayName") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("display_name") + .HasComment("婚姻状况名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("SimpleCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_marital_status") + .IsUnique(); + + b.ToTable("marital_status"); + + b.HasComment("婚姻状况设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalConclusion", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("体检结论编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("体检结论名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MedicalConclusionTypeId") + .HasMaxLength(2) + .HasColumnType("character(2)") + .HasColumnName("medical_conclusion_type_id") + .IsFixedLength(); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex("MedicalConclusionTypeId"); + + b.ToTable("medical_conclusion"); + + b.HasComment("体检结论设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalConclusionType", b => + { + b.Property("Id") + .HasMaxLength(2) + .HasColumnType("character(2)") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_medical_conclusion_type") + .IsUnique(); + + b.ToTable("medical_conclusion_type"); + + b.HasComment("体检结论类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalPackage", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("套餐主档编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1") + .HasComment("显示顺序"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar") + .HasComment("适用性别"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active") + .HasComment("启用标志"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price") + .HasComment("价格"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_medical_package") + .IsUnique(); + + b.ToTable("medical_package"); + + b.HasComment("体检套餐主档设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalPackageDetail", b => + { + b.Property("MedicalPackageId") + .HasColumnType("uuid") + .HasColumnName("medical_package_id") + .IsFixedLength(); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength(); + + b.HasKey("MedicalPackageId", "AsbitemId") + .HasName("pk_medical_package_detail"); + + b.HasIndex("AsbitemId"); + + b.ToTable("medical_package_detail"); + + b.HasComment("体检套餐包含的组合项目设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalReportType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("medical_report_type"); + + b.HasComment("体检报告类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("体检类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("体检类别名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_medical_type") + .IsUnique(); + + b.ToTable("medical_type"); + + b.HasComment("体检类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Nation", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("CountryCode") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("country_code"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("拼音简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_nation") + .IsUnique(); + + b.ToTable("nation"); + + b.HasComment("民族设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.OcCheckType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("职业病检查类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OcCheckTypeName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("oc_check_type_name") + .HasComment("职业病检查类别名称"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("oc_check_type"); + + b.HasComment("职业病检查类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.OperateLog", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ComputerName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("computer_name"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OperateContent") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("operate_content"); + + b.Property("OperateTime") + .HasColumnType("date") + .HasColumnName("operate_time"); + + b.Property("OperateType") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("operate_type"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark"); + + b.Property("Sqlsyntax") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("sqlsyntax"); + + b.Property("TableName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("table_name"); + + b.Property("UserId") + .HasMaxLength(16) + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("WindowName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("window_name"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "ComputerName" }, "ix_operate_log"); + + b.HasIndex(new[] { "WindowName" }, "ix_operate_log_1"); + + b.ToTable("operate_log"); + + b.HasComment("操作日志"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.OrganizationUnitsCustomerOrg", b => + { + b.Property("CustomerOrgId") + .HasColumnType("uuid") + .HasColumnName("customer_org_id") + .IsFixedLength(); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id") + .IsFixedLength(); + + b.HasKey("CustomerOrgId", "OrganizationUnitId") + .HasName("pk_medical_center_org"); + + b.HasIndex("OrganizationUnitId"); + + b.ToTable("organization_units_customer_org"); + + b.HasComment("体检中心单位权限"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Patient", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Address") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("address"); + + b.Property("BirthDate") + .HasColumnType("date") + .HasColumnName("birth_date"); + + b.Property("BirthPlaceId") + .HasColumnType("uuid") + .HasColumnName("birth_place_id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("display_name"); + + b.Property("Email") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("email"); + + b.Property("IdNo") + .HasMaxLength(18) + .HasColumnType("character varying(18)") + .HasColumnName("id_no"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MaritalStatusId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("marital_status_id"); + + b.Property("MobileTelephone") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("mobile_telephone"); + + b.Property("NationId") + .HasColumnType("uuid") + .HasColumnName("nation_id") + .IsFixedLength(); + + b.Property("PatientPassword") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("patient_password"); + + b.Property("PostalCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("postal_code"); + + b.Property("SexId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("sex_id"); + + b.Property("Telephone") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("telephone"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "IdNo" }, "ix_patient"); + + b.HasIndex(new[] { "DisplayName" }, "ix_patient_1"); + + b.ToTable("patient"); + + b.HasComment("体检人员档案"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientOccupationalDisease", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AbnormalTimes") + .HasColumnType("integer") + .HasColumnName("abnormal_times"); + + b.Property("AbortionTimes") + .HasColumnType("integer") + .HasColumnName("abortion_times"); + + b.Property("ChildrenNum") + .HasColumnType("integer") + .HasColumnName("children_num"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DiagnosisDate") + .HasColumnType("date") + .HasColumnName("diagnosis_date"); + + b.Property("DiagnosisHospital") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("diagnosis_hospital"); + + b.Property("DrinkFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("drink_flag"); + + b.Property("DrinkNum") + .HasColumnType("integer") + .HasColumnName("drink_num"); + + b.Property("DrinkYears") + .HasColumnType("integer") + .HasColumnName("drink_years"); + + b.Property("FirstMenstruation") + .HasColumnType("integer") + .HasColumnName("first_menstruation"); + + b.Property("HandleSuggestion") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("handle_suggestion"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MenstrualHistory") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("menstrual_history"); + + b.Property("MenstruationCycle") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("menstruation_cycle"); + + b.Property("MenstruationEndAge") + .HasColumnType("integer") + .HasColumnName("menstruation_end_age"); + + b.Property("MenstruationFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("menstruation_flag"); + + b.Property("MenstruationTimeLength") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("menstruation_time_length"); + + b.Property("NoOccupAbSuggestion") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("no_occup_ab_suggestion"); + + b.Property("NoOccupationalAbnormal") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("no_occupational_abnormal"); + + b.Property("OcCheckTypeId") + .HasColumnType("uuid") + .HasColumnName("oc_check_type_id") + .IsFixedLength(); + + b.Property("OccupationalAbSuggestion") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("occupational_ab_suggestion"); + + b.Property("OccupationalAbnormal") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("occupational_abnormal"); + + b.Property("OccupationalDisease") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("occupational_disease"); + + b.Property("Other") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("other"); + + b.Property("PoisonWorkTime") + .HasMaxLength(6) + .HasColumnType("character varying(6)") + .HasColumnName("poison_work_time"); + + b.Property("PrematureBirthTimes") + .HasColumnType("integer") + .HasColumnName("premature_birth_times"); + + b.Property("PreviousHistory") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("previous_history"); + + b.Property("Recovery") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("recovery"); + + b.Property("SmokeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("smoke_flag"); + + b.Property("SmokeNum") + .HasColumnType("integer") + .HasColumnName("smoke_num"); + + b.Property("SmokeYears") + .HasColumnType("integer") + .HasColumnName("smoke_years"); + + b.Property("StillbirthTimes") + .HasColumnType("integer") + .HasColumnName("stillbirth_times"); + + b.Property("TotalWorkTime") + .HasMaxLength(6) + .HasColumnType("character varying(6)") + .HasColumnName("total_work_time"); + + b.HasKey("Id"); + + b.ToTable("patient_occupational_disease"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientOccupationalHistory", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("BeginDate") + .HasColumnType("date") + .HasColumnName("begin_date"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("EndDate") + .HasColumnType("date") + .HasColumnName("end_date"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Org") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("org"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("Poison") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("poison"); + + b.Property("ProtectiveMeasures") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("protective_measures"); + + b.Property("WorkShop") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("work_shop"); + + b.Property("WorkType") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("work_type"); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.ToTable("patient_occupational_history"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientPoison", b => + { + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("PoisonId") + .HasColumnType("uuid") + .HasColumnName("poison_id") + .IsFixedLength(); + + b.HasKey("PatientRegisterId", "PoisonId") + .HasName("pk_patient_poison"); + + b.HasIndex("PoisonId"); + + b.ToTable("patient_poison"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientRegister", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("登记流水号"); + + b.Property("Age") + .HasColumnType("smallint") + .HasColumnName("age") + .HasComment("年龄"); + + b.Property("AuditDate") + .HasColumnType("date") + .HasColumnName("audit_date"); + + b.Property("AuditDoctor") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("audit_doctor"); + + b.Property("BirthDate") + .HasColumnType("date") + .HasColumnName("birth_date"); + + b.Property("CompleteFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("complete_flag") + .HasDefaultValueSql("'0'::bpchar") + .HasComment("完成标志"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgGroupId") + .HasColumnType("uuid") + .HasColumnName("customer_org_group_id") + .IsFixedLength() + .HasComment("分组"); + + b.Property("CustomerOrgId") + .HasColumnType("uuid") + .HasColumnName("customer_org_id") + .IsFixedLength() + .HasComment("单位编号"); + + b.Property("CustomerOrgRegisterId") + .HasColumnType("uuid") + .HasColumnName("customer_org_register_id"); + + b.Property("GuidePrintTimes") + .HasColumnType("smallint") + .HasColumnName("guide_print_times"); + + b.Property("InterposeMeasure") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("interpose_measure") + .HasComment("干预措施"); + + b.Property("IsAudit") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_audit"); + + b.Property("IsLock") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_lock"); + + b.Property("IsMedicalStart") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_medical_start") + .HasComment("体检开始标志"); + + b.Property("IsNameHide") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_name_hide"); + + b.Property("IsPhoneFollow") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_phone_follow"); + + b.Property("IsRecoverGuide") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_recover_guide"); + + b.Property("IsUpload") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_upload"); + + b.Property("IsVip") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_vip"); + + b.Property("JobCardNo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("job_card_no") + .HasComment("工卡号"); + + b.Property("JobPost") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("job_post") + .HasComment("职务"); + + b.Property("JobTitle") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("job_title") + .HasComment("职称"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MaritalStatusId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("marital_status_id") + .HasDefaultValueSql("'0'::bpchar") + .HasComment("婚姻状况"); + + b.Property("MedicalCardNo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("medical_card_no"); + + b.Property("MedicalConclusionId") + .HasColumnType("uuid") + .HasColumnName("medical_conclusion_id") + .IsFixedLength() + .HasComment("体检结论"); + + b.Property("MedicalPackageId") + .HasColumnType("uuid") + .HasColumnName("medical_package_id") + .IsFixedLength() + .HasComment("套餐"); + + b.Property("MedicalStartDate") + .ValueGeneratedOnAdd() + .HasColumnType("date") + .HasColumnName("medical_start_date") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)") + .HasComment("体检开始日期"); + + b.Property("MedicalTimes") + .HasColumnType("smallint") + .HasColumnName("medical_times") + .HasComment("体检次数"); + + b.Property("MedicalTypeId") + .HasColumnType("uuid") + .HasColumnName("medical_type_id") + .IsFixedLength() + .HasComment("体检类别"); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id"); + + b.Property("PatientId") + .HasColumnType("uuid") + .HasColumnName("patient_id") + .HasComment("档案号"); + + b.Property("PatientName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("patient_name") + .HasComment("姓名"); + + b.Property("PatientRegisterNo") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("patient_register_no") + .HasComment("条码号"); + + b.Property("PersonnelTypeId") + .HasColumnType("uuid") + .HasColumnName("personnel_type_id") + .IsFixedLength() + .HasComment("人员类别"); + + b.Property("Photo") + .HasColumnType("bytea") + .HasColumnName("photo") + .HasComment("照片"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark"); + + b.Property("ReportPrintTimes") + .HasColumnType("smallint") + .HasColumnName("report_print_times") + .HasComment("体检报告打印次数"); + + b.Property("Salesman") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("salesman") + .HasComment("介绍人"); + + b.Property("SexHormoneTermId") + .HasColumnType("uuid") + .HasColumnName("sex_hormone_term_id") + .IsFixedLength(); + + b.Property("SexId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("sex_id") + .HasComment("性别"); + + b.Property("SummaryDate") + .HasColumnType("date") + .HasColumnName("summary_date") + .HasComment("总检日期"); + + b.Property("SummaryDoctor") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("summary_doctor") + .HasComment("总检医生"); + + b.Property("ThirdInfo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("third_info"); + + b.HasKey("Id"); + + b.HasIndex("MaritalStatusId"); + + b.HasIndex(new[] { "CustomerOrgRegisterId" }, "fki_fk_patient_register_org_register"); + + b.HasIndex(new[] { "OrganizationUnitId" }, "fki_fk_patient_register_ororganization_unit"); + + b.HasIndex(new[] { "PatientRegisterNo" }, "ix_patient_register") + .IsUnique(); + + b.HasIndex(new[] { "PatientId", "MedicalTimes" }, "ix_patient_register_1") + .IsUnique(); + + b.HasIndex(new[] { "PatientName" }, "ix_patient_register_2"); + + b.ToTable("patient_register"); + + b.HasComment("体检登记主档"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientSymptom", b => + { + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("SymptomId") + .HasColumnType("uuid") + .HasColumnName("symptom_id") + .IsFixedLength(); + + b.Property("Degree") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("degree"); + + b.Property("TimeLength") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("time_length"); + + b.HasKey("PatientRegisterId", "SymptomId") + .HasName("pk_patient_symptom"); + + b.HasIndex("SymptomId"); + + b.ToTable("patient_symptom"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PayMode", b => + { + b.Property("Id") + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_payment_mode") + .IsUnique(); + + b.ToTable("pay_mode"); + + b.HasComment("支付方式设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PersonnelType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("人员类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("人员类别名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_personnel_type") + .IsUnique(); + + b.ToTable("personnel_type"); + + b.HasComment("人员类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PhoneFollow", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("FollowContent") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("follow_content"); + + b.Property("FollowUpPlanId") + .HasColumnType("uuid") + .HasColumnName("follow_up_plan_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("ReplyContent") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("reply_content"); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.ToTable("phone_follow"); + + b.HasComment("电话随访"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Poison", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("毒害编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("毒害名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PoisonTypeId") + .HasColumnType("uuid") + .HasColumnName("poison_type_id") + .IsFixedLength(); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("PoisonTypeId"); + + b.ToTable("poison"); + + b.HasComment("毒害因素设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PoisonType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("毒害类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("毒害类别名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("poison_type"); + + b.HasComment("毒害因素类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PositionType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("职务编号"); + + b.Property("CreationTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("职务名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime") + .HasComment("最后修改日期"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId") + .HasComment("最后修改者"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_position_type") + .IsUnique(); + + b.ToTable("position_type"); + + b.HasComment("职务类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PriceItem", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("InvoiceItemTypeId") + .HasColumnType("uuid") + .HasColumnName("invoice_item_type_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price"); + + b.Property("PriceItemCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("price_item_code"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("InvoiceItemTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_price_item") + .IsUnique(); + + b.ToTable("price_item"); + + b.HasComment("价表项目设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PrimarykeyBuilder", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("主键编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DateString") + .HasMaxLength(8) + .HasColumnType("character(8)") + .HasColumnName("date_string") + .IsFixedLength() + .HasComment("日期"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SerialNo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("serial_no") + .HasComment("序列号"); + + b.HasKey("Id"); + + b.ToTable("primarykey_builder"); + + b.HasComment("主键产生器"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.QueueRegister", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CallTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("call_time"); + + b.Property("CompleteFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("complete_flag") + .HasDefaultValueSql("0"); + + b.Property("CreationTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("NoCompleteReason") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("no_complete_reason") + .HasDefaultValueSql("0"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("RoomId") + .HasColumnType("uuid") + .HasColumnName("room_id") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.ToTable("queue_register"); + + b.HasComment("排队登记"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ReferenceRange", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("参考范围编号"); + + b.Property("AgeLowerLimit") + .HasColumnType("smallint") + .HasColumnName("age_lower_limit") + .HasComment("年龄下限"); + + b.Property("AgeUpperLimit") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasColumnName("age_upper_limit") + .HasDefaultValueSql("200") + .HasComment("年龄上限"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CriticalRangeValue") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("critical_range_value"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar") + .HasComment("性别"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LowerDiagnosisId") + .HasColumnType("uuid") + .HasColumnName("lower_diagnosis_id") + .IsFixedLength() + .HasComment("偏低诊断"); + + b.Property("ReferenceRangeTypeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("reference_range_type_flag"); + + b.Property("ReferenceRangeValue") + .HasMaxLength(150) + .HasColumnType("character varying(150)") + .HasColumnName("reference_range_value"); + + b.Property("UpperDiagnosisId") + .HasColumnType("uuid") + .HasColumnName("upper_diagnosis_id") + .IsFixedLength() + .HasComment("偏高诊断"); + + b.HasKey("Id"); + + b.HasIndex("ItemId"); + + b.ToTable("reference_range"); + + b.HasComment("项目参考范围设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterAsbitem", b => + { + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id"); + + b.Property("AsbitemId") + .HasMaxLength(6) + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength() + .HasComment("组合项目"); + + b.Property("Amount") + .HasColumnType("smallint") + .HasColumnName("amount"); + + b.Property("ChargePrice") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_price") + .HasComment("实收价格"); + + b.Property("IsCharge") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_charge") + .HasComment("是否已收费"); + + b.Property("LisRequestId") + .HasMaxLength(20) + .HasColumnType("uuid") + .HasColumnName("lis_request_id"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("登记流水号"); + + b.Property("PayTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("pay_type_flag") + .HasDefaultValueSql("0") + .HasComment("支付方式,比如是自费、免费、单位支付"); + + b.Property("RegisterAsbitemId") + .HasColumnType("uuid") + .HasColumnName("register_asbitem_id"); + + b.Property("StandardPrice") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("standard_price") + .HasComment("标准价格"); + + b.HasKey("RegisterCheckId", "AsbitemId") + .HasName("pk_register_asbitem"); + + b.HasIndex("AsbitemId"); + + b.HasIndex(new[] { "PatientRegisterId", "AsbitemId" }, "ix_register_asbitem") + .IsUnique(); + + b.ToTable("register_asbitem"); + + b.HasComment("检查组合项目记录"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheck", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AuditTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("audit_time"); + + b.Property("AuditorUserId") + .HasColumnType("uuid") + .HasColumnName("auditor_user_id"); + + b.Property("CheckDate") + .HasColumnType("date") + .HasColumnName("check_date"); + + b.Property("CheckDoctorId") + .HasColumnType("uuid") + .HasColumnName("check_doctor_id"); + + b.Property("CheckRequestNo") + .HasMaxLength(20) + .HasColumnType("uuid") + .HasColumnName("check_request_no"); + + b.Property("CheckRequestPrintTimes") + .HasColumnType("smallint") + .HasColumnName("check_request_print_times"); + + b.Property("CompleteFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("complete_flag") + .HasDefaultValueSql("0"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CriticalValue") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("critical_value"); + + b.Property("CriticalValueCreateDate") + .HasColumnType("date") + .HasColumnName("critical_value_create_date"); + + b.Property("CriticalValueFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("critical_value_flag") + .HasDefaultValueSql("0"); + + b.Property("CriticalValueProcessContent") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("critical_value_process_content"); + + b.Property("CriticalValueProcessDate") + .HasColumnType("date") + .HasColumnName("critical_value_process_date"); + + b.Property("CriticalValueProcessDoctor") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("critical_value_process_doctor"); + + b.Property("CriticalValueProcessFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("critical_value_process_flag"); + + b.Property("IsAudit") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_audit"); + + b.Property("IsLock") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_lock"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ThirdInfo") + .HasMaxLength(80) + .HasColumnType("character varying(80)") + .HasColumnName("third_info"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "CheckRequestNo" }, "ix_register_check_1"); + + b.ToTable("register_check"); + + b.HasComment("登记检查单"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckCriticalValue", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CriticalValue") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("critical_value"); + + b.Property("Doctor") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("doctor"); + + b.Property("IsComplete") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_complete"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ProcessTypeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("process_type_flag"); + + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id"); + + b.HasKey("Id"); + + b.ToTable("register_check_critical_value"); + + b.HasComment("检查危急值"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckItem", b => + { + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目"); + + b.Property("CheckDate") + .HasColumnType("date") + .HasColumnName("check_date") + .HasComment("检查日期"); + + b.Property("CheckDoctorName") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("check_doctor_name") + .HasComment("检查医生"); + + b.Property("CriticalRangeValue") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("critical_range_value"); + + b.Property("CriticalValue") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("critical_value"); + + b.Property("ReferenceRangeValue") + .ValueGeneratedOnAdd() + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("reference_range_value") + .HasDefaultValueSql("''::character varying") + .HasComment("参考范围"); + + b.Property("Result") + .HasMaxLength(1000) + .HasColumnType("character varying(1000)") + .HasColumnName("result") + .HasComment("结果"); + + b.Property("ResultStatusId") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("result_status_id") + .HasComment("报告单提示"); + + b.Property("Unit") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("unit"); + + b.HasKey("RegisterCheckId", "ItemId") + .HasName("pk_register_item_1"); + + b.HasIndex("ItemId"); + + b.HasIndex("ResultStatusId"); + + b.ToTable("register_check_item"); + + b.HasComment("检查明细项目记录"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckPicture", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("检查图片编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1") + .HasComment("显示顺序"); + + b.Property("IsPrint") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_print") + .HasComment("打印标志"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PictureFilename") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("picture_filename") + .HasComment("图片名"); + + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id") + .HasComment("登记流水号"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "RegisterCheckId", "PictureFilename" }, "ix_check_picture") + .IsUnique(); + + b.ToTable("register_check_picture"); + + b.HasComment("体检登记组合项目图片"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckSuggestion", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id"); + + b.Property("Suggestion") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("suggestion"); + + b.HasKey("Id"); + + b.HasIndex("RegisterCheckId"); + + b.ToTable("register_check_suggestion"); + + b.HasComment("登记检查建议"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckSummary", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id"); + + b.Property("Summary") + .HasMaxLength(500) + .HasColumnType("character varying(500)") + .HasColumnName("summary"); + + b.Property("SummaryFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("summary_flag"); + + b.HasKey("Id"); + + b.HasIndex("RegisterCheckId"); + + b.ToTable("register_check_summary"); + + b.HasComment("登记检查综述"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ResultStatus", b => + { + b.Property("Id") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("id"); + + b.Property("DataInputBackgroundColor") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("data_input_background_color") + .HasDefaultValueSql("16777215"); + + b.Property("DataInputFontColor") + .HasColumnType("integer") + .HasColumnName("data_input_font_color"); + + b.Property("DataInputPrompt") + .HasMaxLength(8) + .HasColumnType("character varying(8)") + .HasColumnName("data_input_prompt"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("ReportBackgroundColor") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("report_background_color") + .HasDefaultValueSql("16777215"); + + b.Property("ReportFontColor") + .HasColumnType("integer") + .HasColumnName("report_font_color"); + + b.Property("ReportPrompt") + .HasMaxLength(8) + .HasColumnType("character varying(8)") + .HasColumnName("report_prompt"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_result_status") + .IsUnique(); + + b.ToTable("result_status"); + + b.HasComment("结果状态设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Room", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DepartmentId") + .HasColumnType("uuid") + .HasColumnName("department_id") + .IsFixedLength(); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("RoomTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("room_type_flag") + .HasDefaultValueSql("0"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("DepartmentId"); + + b.HasIndex("ItemTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_room") + .IsUnique(); + + b.ToTable("room"); + + b.HasComment("房间设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleContainer", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("ContainerColor") + .HasColumnType("integer") + .HasColumnName("container_color"); + + b.Property("ContainerColorName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("container_color_name"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_sample_container") + .IsUnique(); + + b.ToTable("sample_container"); + + b.HasComment("标本容器设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleGroup", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SampleContainerId") + .HasColumnType("uuid") + .HasColumnName("sample_container_id") + .IsFixedLength(); + + b.Property("SampleTypeId") + .HasColumnType("uuid") + .HasColumnName("sample_type_id") + .IsFixedLength(); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("SampleContainerId"); + + b.HasIndex("SampleTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_sample_group") + .IsUnique(); + + b.ToTable("sample_group"); + + b.HasComment("标本分组设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleGroupDetail", b => + { + b.Property("SampleGroupId") + .HasColumnType("uuid") + .HasColumnName("sample_group_id") + .IsFixedLength(); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength(); + + b.HasKey("SampleGroupId", "AsbitemId") + .HasName("pk_sample_group_detail"); + + b.HasIndex(new[] { "AsbitemId" }, "ix_sample_group_detail") + .IsUnique(); + + b.ToTable("sample_group_detail"); + + b.HasComment("标本分组包含组合项目设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_sample_type"); + + b.ToTable("sample_type"); + + b.HasComment("标本类型设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ServiceTrade", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DepartmentId") + .HasColumnType("uuid") + .HasColumnName("department_id") + .IsFixedLength(); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("ValidPeriod") + .HasColumnType("smallint") + .HasColumnName("valid_period") + .HasComment("有效期"); + + b.Property("ValidPeriodDisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("valid_period_display_name"); + + b.Property("ValidPeriodUnit") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("valid_period_unit"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DepartmentId", "DisplayName" }, "ix_service_trades") + .IsUnique(); + + b.ToTable("service_trades"); + + b.HasComment("服务行业设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SettleAccount", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CompletedBy") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("completed_by"); + + b.Property("CompletedTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("completed_time"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("IsComplete") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_complete"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.ToTable("settle_account"); + + b.HasComment("结账"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Sex", b => + { + b.Property("Id") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("id"); + + b.Property("DisplayName") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("SimpleCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("sex"); + + b.HasComment("性别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SexHormoneReferenceRange", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("AgeLowerLimit") + .HasColumnType("smallint") + .HasColumnName("age_lower_limit"); + + b.Property("AgeUpperLimit") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasColumnName("age_upper_limit") + .HasDefaultValueSql("200"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CriticalRangeValue") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("critical_range_value"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LowerDiagnosisId") + .HasColumnType("uuid") + .HasColumnName("lower_diagnosis_id") + .IsFixedLength(); + + b.Property("ReferenceRangeValue") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("reference_range_value"); + + b.Property("SexHormoneTermId") + .HasColumnType("uuid") + .HasColumnName("sex_hormone_term_id") + .IsFixedLength(); + + b.Property("UpperDiagnosisId") + .HasColumnType("uuid") + .HasColumnName("upper_diagnosis_id") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("ItemId"); + + b.HasIndex("SexHormoneTermId"); + + b.ToTable("sex_hormone_reference_range"); + + b.HasComment("性激素参考范围设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SexHormoneTerm", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_sex_hormone_term") + .IsUnique(); + + b.ToTable("sex_hormone_term"); + + b.HasComment("性激素期限设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SmsSend", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Content") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("content"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("FollowUpPlanId") + .HasColumnType("uuid") + .HasColumnName("follow_up_plan_id"); + + b.Property("IsComplete") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_complete"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MobileTelephone") + .HasMaxLength(11) + .HasColumnType("character varying(11)") + .HasColumnName("mobile_telephone"); + + b.Property("PatientId") + .HasColumnType("uuid") + .HasColumnName("patient_id"); + + b.Property("PatientName") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("patient_name"); + + b.Property("SmsTypeId") + .HasColumnType("uuid") + .HasColumnName("sms_type_id") + .IsFixedLength(); + + b.HasKey("Id"); + + b.ToTable("sms_send"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SmsTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("Content") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("content"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("smallint") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("SmsTypeId") + .HasColumnType("uuid") + .HasColumnName("sms_type_id") + .IsFixedLength(); + + b.HasKey("Id"); + + b.ToTable("sms_template"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SmsType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("smallint") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("sms_type"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Suggestion", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength(); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SuggestionContent") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("suggestion_content"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DiagnosisId", "SuggestionContent" }, "ix_suggestion") + .IsUnique(); + + b.ToTable("suggestion"); + + b.HasComment("建议设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumDiagnosis", b => + { + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength(); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("SumSuggestionHeaderId") + .HasColumnType("uuid") + .HasColumnName("sum_suggestion_header_id"); + + b.HasKey("PatientRegisterId", "DiagnosisId") + .HasName("pk_summary_diagnosis"); + + b.HasIndex("DiagnosisId"); + + b.ToTable("sum_diagnosis"); + + b.HasComment("总检诊断"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SummaryTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("TemplateContent") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("template_content"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_summary_template") + .IsUnique(); + + b.ToTable("summary_template"); + + b.HasComment("综述模板设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSuggestionContent", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SuggestionContent") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("suggestion_content"); + + b.Property("SumSuggestionHeaderId") + .HasColumnType("uuid") + .HasColumnName("sum_suggestion_header_id"); + + b.HasKey("Id"); + + b.HasIndex("SumSuggestionHeaderId"); + + b.ToTable("sum_suggestion_content"); + + b.HasComment("总检建议内容"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSuggestionHeader", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("SuggestionFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("suggestion_flag"); + + b.Property("SuggestionTitle") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("suggestion_title"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "PatientRegisterId", "SuggestionTitle" }, "ix_sum_suggestion_title") + .IsUnique(); + + b.ToTable("sum_suggestion_header"); + + b.HasComment("总检建议头"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSummaryContent", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SumSummaryHeaderId") + .HasColumnType("uuid") + .HasColumnName("sum_summary_header_id"); + + b.Property("SummaryContent") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("summary_content"); + + b.HasKey("Id"); + + b.HasIndex("SumSummaryHeaderId"); + + b.ToTable("sum_summary_content"); + + b.HasComment("总检综述内容"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSummaryHeader", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("SummaryFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("summary_flag"); + + b.Property("SummaryTitle") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("summary_title"); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.ToTable("sum_summary_header"); + + b.HasComment("总检综述头"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Symptom", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("症状编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("症状名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("symptom"); + + b.HasComment("症状"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Sysdiagram", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("Definition") + .HasColumnType("bytea") + .HasColumnName("definition"); + + b.Property("DisplayName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("display_name"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PrincipalId") + .HasColumnType("uuid") + .HasColumnName("principal_id"); + + b.Property("Version") + .HasColumnType("integer") + .HasColumnName("version"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "PrincipalId", "DisplayName" }, "uk_principal_name") + .IsUnique(); + + b.ToTable("sysdiagrams"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParm", b => + { + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("SysParmTypeId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("sys_parm_type_id"); + + b.Property("ValueType") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("value_type"); + + b.HasKey("Id"); + + b.HasIndex("SysParmTypeId"); + + b.ToTable("sys_parm"); + + b.HasComment("系统参数设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmType", b => + { + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("parent_id"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("sys_parm_type"); + + b.HasComment("系统参数类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmValue", b => + { + b.Property("SysParmId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("sys_parm_id"); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParmValue") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("parm_value"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark"); + + b.HasKey("SysParmId", "OrganizationUnitId") + .HasName("pk_sys_parm_value"); + + b.ToTable("sys_parm_value"); + + b.HasComment("系统参数值设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmValueOption", b => + { + b.Property("SysParmId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("sys_parm_id"); + + b.Property("ValueOption") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("value_option"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("ValueOptionName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("value_option_name"); + + b.HasKey("SysParmId", "ValueOption") + .HasName("pk_sys_parm_value_option"); + + b.ToTable("sys_parm_value_option"); + + b.HasComment("系统参数可选值设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.TitleType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("职称类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("职称类别名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_title_type") + .IsUnique(); + + b.ToTable("title_type"); + + b.HasComment("职称类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Unit", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("unit"); + + b.HasComment("单位设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.User", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Address") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("address"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DepartmentId") + .HasColumnType("uuid") + .HasColumnName("department_id") + .IsFixedLength(); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("Email") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("email"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LockScreenTimeInterval") + .HasColumnType("integer") + .HasColumnName("lock_screen_time_interval"); + + b.Property("ModifiedDate") + .ValueGeneratedOnAdd() + .HasColumnType("date") + .HasColumnName("modified_date") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("Modifier") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("modifier"); + + b.Property("PasswordHash") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("password_hash"); + + b.Property("PasswordSalt") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("password_salt"); + + b.Property("Photo") + .HasColumnType("bytea") + .HasColumnName("photo"); + + b.Property("PositionTypeId") + .HasColumnType("uuid") + .HasColumnName("position_type_id"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark"); + + b.Property("SexId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("sex_id"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("Telephone") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("telephone"); + + b.Property("TitleTypeId") + .HasColumnType("uuid") + .HasColumnName("title_type_id"); + + b.Property("UserTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("user_type_flag") + .HasDefaultValueSql("0") + .HasComment("用户类型"); + + b.HasKey("Id"); + + b.HasIndex("DepartmentId"); + + b.ToTable("users"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserDepartment", b => + { + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("DepartmentId") + .HasColumnType("uuid") + .HasColumnName("department_id") + .IsFixedLength(); + + b.HasKey("UserId", "DepartmentId") + .HasName("pk_user_operate_department"); + + b.HasIndex("DepartmentId"); + + b.ToTable("user_department"); + + b.HasComment("用户科室操作权限"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserGrouping", b => + { + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("GroupingId") + .HasColumnType("uuid") + .HasColumnName("grouping_id"); + + b.HasKey("UserId", "GroupingId") + .HasName("pk_user_grouping"); + + b.HasIndex("GroupingId"); + + b.ToTable("user_grouping"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserItemType", b => + { + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength(); + + b.HasKey("UserId", "ItemTypeId") + .HasName("pk_user_item_type"); + + b.HasIndex("ItemTypeId"); + + b.ToTable("user_item_type"); + + b.HasComment("用户项目类别权限设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserRight", b => + { + b.Property("Application") + .HasMaxLength(32) + .HasColumnType("character varying(32)") + .HasColumnName("application"); + + b.Property("WindowName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("window_name"); + + b.Property("ControlName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("control_name"); + + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("IsUser") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_user"); + + b.Property("Status") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("status"); + + b.HasKey("Application", "WindowName", "ControlName", "UserId", "IsUser") + .HasName("pk_sys_function"); + + b.ToTable("user_rights"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("character varying(96)") + .HasColumnName("ApplicationName"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("BrowserInfo"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("ClientId"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("ClientIpAddress"); + + b.Property("ClientName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("ClientName"); + + b.Property("Comments") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("Comments"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("CorrelationId"); + + b.Property("Exceptions") + .HasColumnType("text"); + + b.Property("ExecutionDuration") + .HasColumnType("integer") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("timestamp without time zone"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("HttpMethod") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("HttpMethod"); + + b.Property("HttpStatusCode") + .HasColumnType("integer") + .HasColumnName("HttpStatusCode"); + + b.Property("ImpersonatorTenantId") + .HasColumnType("uuid") + .HasColumnName("ImpersonatorTenantId"); + + b.Property("ImpersonatorTenantName") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("ImpersonatorTenantName"); + + b.Property("ImpersonatorUserId") + .HasColumnType("uuid") + .HasColumnName("ImpersonatorUserId"); + + b.Property("ImpersonatorUserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("ImpersonatorUserName"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("TenantName"); + + b.Property("Url") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("Url"); + + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("UserId"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ExecutionTime"); + + b.HasIndex("TenantId", "UserId", "ExecutionTime"); + + b.ToTable("AbpAuditLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("AuditLogId") + .HasColumnType("uuid") + .HasColumnName("AuditLogId"); + + b.Property("ExecutionDuration") + .HasColumnType("integer") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("ExecutionTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("MethodName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("MethodName"); + + b.Property("Parameters") + .HasMaxLength(2000) + .HasColumnType("character varying(2000)") + .HasColumnName("Parameters"); + + b.Property("ServiceName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("ServiceName"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); + + b.ToTable("AbpAuditLogActions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("AuditLogId") + .HasColumnType("uuid") + .HasColumnName("AuditLogId"); + + b.Property("ChangeTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("ChangeTime"); + + b.Property("ChangeType") + .HasColumnType("smallint") + .HasColumnName("ChangeType"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("EntityId"); + + b.Property("EntityTenantId") + .HasColumnType("uuid"); + + b.Property("EntityTypeFullName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("EntityTypeFullName"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); + + b.ToTable("AbpEntityChanges", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("EntityChangeId") + .HasColumnType("uuid"); + + b.Property("NewValue") + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("NewValue"); + + b.Property("OriginalValue") + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("OriginalValue"); + + b.Property("PropertyName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("PropertyName"); + + b.Property("PropertyTypeFullName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("PropertyTypeFullName"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityChangeId"); + + b.ToTable("AbpEntityPropertyChanges", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsAbandoned") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false); + + b.Property("JobArgs") + .IsRequired() + .HasMaxLength(1048576) + .HasColumnType("character varying(1048576)"); + + b.Property("JobName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("LastTryTime") + .HasColumnType("timestamp without time zone"); + + b.Property("NextTryTime") + .HasColumnType("timestamp without time zone"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasDefaultValue((byte)15); + + b.Property("TryCount") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasDefaultValue((short)0); + + b.HasKey("Id"); + + b.HasIndex("IsAbandoned", "NextTryTime"); + + b.ToTable("AbpBackgroundJobs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpFeatureValues", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsStatic") + .HasColumnType("boolean"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("Regex") + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("RegexDescription") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("Required") + .HasColumnType("boolean"); + + b.Property("ValueType") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("SourceTenantId") + .HasColumnType("uuid"); + + b.Property("SourceUserId") + .HasColumnType("uuid"); + + b.Property("TargetTenantId") + .HasColumnType("uuid"); + + b.Property("TargetUserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique(); + + b.ToTable("AbpLinkUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDefault") + .HasColumnType("boolean") + .HasColumnName("IsDefault"); + + b.Property("IsPublic") + .HasColumnType("boolean") + .HasColumnName("IsPublic"); + + b.Property("IsStatic") + .HasColumnType("boolean") + .HasColumnName("IsStatic"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.Property("RoleId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Action") + .HasMaxLength(96) + .HasColumnType("character varying(96)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("character varying(96)"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("Identity") + .HasMaxLength(96) + .HasColumnType("character varying(96)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Action"); + + b.HasIndex("TenantId", "ApplicationName"); + + b.HasIndex("TenantId", "Identity"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSecurityLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("boolean") + .HasColumnName("IsActive"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsExternal") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsExternal"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); + + b.Property("LockoutEnd") + .HasColumnType("timestamp with time zone"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("Name"); + + b.Property("NormalizedEmail") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("NormalizedEmail"); + + b.Property("NormalizedUserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("NormalizedUserName"); + + b.Property("PasswordHash") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("PasswordHash"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("SecurityStamp"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("Email"); + + b.HasIndex("NormalizedEmail"); + + b.HasIndex("NormalizedUserName"); + + b.HasIndex("UserName"); + + b.ToTable("AbpUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderDisplayName") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(196) + .HasColumnType("character varying(196)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "LoginProvider"); + + b.HasIndex("LoginProvider", "ProviderKey"); + + b.ToTable("AbpUserLogins", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uuid"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "UserId"); + + b.HasIndex("UserId", "OrganizationUnitId"); + + b.ToTable("AbpUserOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("RoleId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId", "UserId"); + + b.ToTable("AbpUserRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasColumnType("text"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(95) + .HasColumnType("character varying(95)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsPeis") + .HasMaxLength(1) + .HasColumnType("character varying(1)"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code"); + + b.HasIndex("ParentId"); + + b.ToTable("AbpOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uuid"); + + b.Property("RoleId") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "RoleId"); + + b.HasIndex("RoleId", "OrganizationUnitId"); + + b.ToTable("AbpOrganizationUnitRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ClientId") + .HasMaxLength(100) + .HasColumnType("character varying(100)"); + + b.Property("ClientSecret") + .HasColumnType("text"); + + b.Property("ClientUri") + .HasColumnType("text"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConsentType") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .HasColumnType("text"); + + b.Property("DisplayNames") + .HasColumnType("text"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LogoUri") + .HasColumnType("text"); + + b.Property("Permissions") + .HasColumnType("text"); + + b.Property("PostLogoutRedirectUris") + .HasColumnType("text"); + + b.Property("Properties") + .HasColumnType("text"); + + b.Property("RedirectUris") + .HasColumnType("text"); + + b.Property("Requirements") + .HasColumnType("text"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("OpenIddictApplications", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ApplicationId") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("timestamp without time zone"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Properties") + .HasColumnType("text"); + + b.Property("Scopes") + .HasColumnType("text"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("character varying(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictAuthorizations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Scopes.OpenIddictScope", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("text"); + + b.Property("Descriptions") + .HasColumnType("text"); + + b.Property("DisplayName") + .HasColumnType("text"); + + b.Property("DisplayNames") + .HasColumnType("text"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(200) + .HasColumnType("character varying(200)"); + + b.Property("Properties") + .HasColumnType("text"); + + b.Property("Resources") + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("OpenIddictScopes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ApplicationId") + .HasColumnType("uuid"); + + b.Property("AuthorizationId") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("timestamp without time zone"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExpirationDate") + .HasColumnType("timestamp without time zone"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Payload") + .HasColumnType("text"); + + b.Property("Properties") + .HasColumnType("text"); + + b.Property("RedemptionDate") + .HasColumnType("timestamp without time zone"); + + b.Property("ReferenceId") + .HasMaxLength(100) + .HasColumnType("character varying(100)"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("character varying(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.HasKey("Id"); + + b.HasIndex("AuthorizationId"); + + b.HasIndex("ReferenceId"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpPermissionGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("character varying(2048)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpSettings", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("AbpTenants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("uuid"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.HasKey("TenantId", "Name"); + + b.ToTable("AbpTenantConnectionStrings", (string)null); + }); + + modelBuilder.Entity("ChildDiagnosis", b => + { + b.HasOne("Shentun.Peis.Models.Diagnosis", null) + .WithMany() + .HasForeignKey("DiagnosisId") + .IsRequired() + .HasConstraintName("fk_child_diagnosis_diagnosis1"); + + b.HasOne("Shentun.Peis.Models.Diagnosis", null) + .WithMany() + .HasForeignKey("ParentDiagnosisId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_child_diagnosis_diagnosis"); + }); + + modelBuilder.Entity("RoomAsbitem", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", null) + .WithMany() + .HasForeignKey("AsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_room_asbitem_asbitem"); + + b.HasOne("Shentun.Peis.Models.Room", null) + .WithMany() + .HasForeignKey("RoomId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_room_asbitem_room"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.HelloA", b => + { + b.HasOne("Shentun.Peis.Books.HelloType", "HelloType") + .WithMany("HelloAs") + .HasForeignKey("HelloTypeId") + .IsRequired() + .HasConstraintName("fk_hello_a_hello_type"); + + b.Navigation("HelloType"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.TestB", b => + { + b.HasOne("Shentun.Peis.Books.TestA", "TestAs") + .WithMany("TestBs") + .HasForeignKey("TestAsAId"); + + b.Navigation("TestAs"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Asbitem", b => + { + b.HasOne("Shentun.Peis.Models.InvoiceItemType", "InvoiceItemType") + .WithMany("Asbitems") + .HasForeignKey("InvoiceItemTypeId") + .IsRequired() + .HasConstraintName("fk_asbitem_invoice_item_type"); + + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("Asbitems") + .HasForeignKey("ItemTypeId") + .IsRequired() + .HasConstraintName("fk_asbitem_item_type"); + + b.Navigation("InvoiceItemType"); + + b.Navigation("ItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.AsbitemDetail", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithMany("AsbitemDetails") + .HasForeignKey("AsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_asbitem_detail_asbitem"); + + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("AsbitemDetails") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_asbitem_detail_item"); + + b.Navigation("Asbitem"); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultConclusion", b => + { + b.HasOne("Shentun.Peis.Models.BigtextResultTemplate", "BigtextResultTemplate") + .WithMany("BigtextResultConclusions") + .HasForeignKey("BigtextResultTemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_bigtext"); + + b.Navigation("BigtextResultTemplate"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultDescription", b => + { + b.HasOne("Shentun.Peis.Models.BigtextResultTemplate", "BigtextResultTemplate") + .WithMany("BigtextResultDescriptions") + .HasForeignKey("BigtextResultTemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_bigtext"); + + b.Navigation("BigtextResultTemplate"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultTemplate", b => + { + b.HasOne("Shentun.Peis.Models.BigtextResultType", "BigtextResultType") + .WithMany("BigtextResultTemplates") + .HasForeignKey("BigtextResultTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_bigtext"); + + b.Navigation("BigtextResultType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultType", b => + { + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("BigtextResultTypes") + .HasForeignKey("ItemTypeId") + .IsRequired() + .HasConstraintName("fk_bigtext"); + + b.Navigation("ItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardBill", b => + { + b.HasOne("Shentun.Peis.Models.CardRegister", "CardRegister") + .WithMany("CardBills") + .HasForeignKey("CardRegisterId") + .IsRequired() + .HasConstraintName("fk_card_bil_reference_card_reg"); + + b.HasOne("Shentun.Peis.Models.PayMode", "PayMode") + .WithMany("CardBills") + .HasForeignKey("PayModeId") + .HasConstraintName("fk_card_bill_payment_mode"); + + b.Navigation("CardRegister"); + + b.Navigation("PayMode"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardRegister", b => + { + b.HasOne("Shentun.Peis.Models.CardType", "CardType") + .WithMany("CardRegisters") + .HasForeignKey("CardTypeId") + .IsRequired() + .HasConstraintName("fk_card_reg_reference_card_typ"); + + b.HasOne("Shentun.Peis.Models.Department", "OrganizationUnit") + .WithMany("CardRegisters") + .HasForeignKey("OrganizationUnitId") + .IsRequired() + .HasConstraintName("fk_card_register_department"); + + b.Navigation("CardType"); + + b.Navigation("OrganizationUnit"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Charge", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("Charges") + .HasForeignKey("PatientRegisterId") + .IsRequired() + .HasConstraintName("fk_patient_register_charge"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeAsbitem", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithMany("ChargeAsbitems") + .HasForeignKey("AsbitemId") + .IsRequired() + .HasConstraintName("fk_charge_asbitem_asbitem"); + + b.HasOne("Shentun.Peis.Models.Charge", "Charge") + .WithMany("ChargeAsbitems") + .HasForeignKey("ChargeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_charge_asbitem_charge"); + + b.Navigation("Asbitem"); + + b.Navigation("Charge"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeBack", b => + { + b.HasOne("Shentun.Peis.Models.Charge", "Charge") + .WithMany("ChargeBacks") + .HasForeignKey("ChargeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_bill_bac_reference_bill"); + + b.Navigation("Charge"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeBackPay", b => + { + b.HasOne("Shentun.Peis.Models.ChargeBack", "ChargeBack") + .WithMany("ChargeBackPays") + .HasForeignKey("ChargeBackId") + .IsRequired() + .HasConstraintName("fk_charge_back_pay_charge_back"); + + b.HasOne("Shentun.Peis.Models.PayMode", "PayMode") + .WithMany("ChargeBackPays") + .HasForeignKey("PayModeId") + .IsRequired() + .HasConstraintName("fk_charge_back_pay_pay_mode"); + + b.Navigation("ChargeBack"); + + b.Navigation("PayMode"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargePay", b => + { + b.HasOne("Shentun.Peis.Models.Charge", "Charge") + .WithMany("ChargePays") + .HasForeignKey("ChargeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_charge_payment_mode_charge"); + + b.HasOne("Shentun.Peis.Models.PayMode", "PayMode") + .WithMany("ChargePays") + .HasForeignKey("PayModeId") + .IsRequired() + .HasConstraintName("fk_charge_"); + + b.Navigation("Charge"); + + b.Navigation("PayMode"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargePriceItem", b => + { + b.HasOne("Shentun.Peis.Models.ChargeAsbitem", "ChargeAsbitem") + .WithMany("ChargePriceItems") + .HasForeignKey("ChargeAsbitemId") + .IsRequired() + .HasConstraintName("fk_charge_asbitem"); + + b.Navigation("ChargeAsbitem"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CommonChar", b => + { + b.HasOne("Shentun.Peis.Models.CommonCharType", "CommonCharType") + .WithMany("CommonChars") + .HasForeignKey("CommonCharTypeId") + .IsRequired() + .HasConstraintName("fk_common_char_common_char_type"); + + b.Navigation("CommonCharType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ContactMethod", b => + { + b.HasOne("Shentun.Peis.Models.ContactPerson", "ContactPerson") + .WithMany("ContactMethods") + .HasForeignKey("ContactPersonId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_contact_method_contact"); + + b.Navigation("ContactPerson"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ContactPerson", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrg", "CustomerOrg") + .WithMany("ContactPeople") + .HasForeignKey("CustomerOrgId") + .IsRequired() + .HasConstraintName("fk_contact_org"); + + b.Navigation("CustomerOrg"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CriticalValue", b => + { + b.HasOne("Shentun.Peis.Models.CriticalValueType", "CriticalValueType") + .WithMany("CriticalValues") + .HasForeignKey("CriticalValueTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_critica"); + + b.Navigation("CriticalValueType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgCharge", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgRegister", "CustomerOrgRegister") + .WithMany("CustomerOrgCharges") + .HasForeignKey("CustomerOrgRegisterId") + .IsRequired() + .HasConstraintName("fk_customer_org_charge_register"); + + b.Navigation("CustomerOrgRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargeBack", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgCharge", "CustomerOrgCharge") + .WithMany("CustomerOrgChargeBacks") + .HasForeignKey("CustomerOrgChargeId") + .IsRequired() + .HasConstraintName("fk_org_charge_back_org_charge"); + + b.Navigation("CustomerOrgCharge"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargeBackPay", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgChargeBack", "CustomerOrgChargeBack") + .WithMany("CustomerOrgChargeBackPays") + .HasForeignKey("CustomerOrgChargeBackId") + .IsRequired() + .HasConstraintName("fk_org_cha"); + + b.HasOne("Shentun.Peis.Models.PayMode", "PayMode") + .WithMany("CustomerOrgChargeBackPays") + .HasForeignKey("PayModeId") + .IsRequired() + .HasConstraintName("fk_org_charge_back_pay_pay_mode"); + + b.Navigation("CustomerOrgChargeBack"); + + b.Navigation("PayMode"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargePay", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgCharge", "CustomerOrgCharge") + .WithOne("CustomerOrgChargePay") + .HasForeignKey("Shentun.Peis.Models.CustomerOrgChargePay", "Id") + .IsRequired() + .HasConstraintName("fk_org_charge_pay_org_charge"); + + b.HasOne("Shentun.Peis.Models.PayMode", "PayMode") + .WithMany("CustomerOrgChargePays") + .HasForeignKey("PayModeId") + .HasConstraintName("fk_org_charge_pay_pay_mode"); + + b.Navigation("CustomerOrgCharge"); + + b.Navigation("PayMode"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgGroup", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgRegister", "CustomerOrgRegister") + .WithMany("CustomerOrgGroups") + .HasForeignKey("CustomerOrgRegisterId") + .IsRequired() + .HasConstraintName("fk_customer_org_group_register"); + + b.Navigation("CustomerOrgRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgGroupDetail", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithMany("CustomerOrgGroupDetails") + .HasForeignKey("AsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_org_group_detail_asbitem"); + + b.HasOne("Shentun.Peis.Models.CustomerOrgGroup", "CustomerOrgGroup") + .WithMany("CustomerOrgGroupDetails") + .HasForeignKey("CustomerOrgGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_org_group_detail_org_group"); + + b.Navigation("Asbitem"); + + b.Navigation("CustomerOrgGroup"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgRegister", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrg", "CustomerOrg") + .WithMany("CustomerOrgRegisters") + .HasForeignKey("CustomerOrgId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_org_medi_reference_org"); + + b.Navigation("CustomerOrg"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Diagnosis", b => + { + b.HasOne("Shentun.Peis.Models.DiagnosisLevel", "DiagnosisLevel") + .WithMany("Diagnoses") + .HasForeignKey("DiagnosisLevelId") + .IsRequired() + .HasConstraintName("fk_diagnosis_diagnosis_level"); + + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("Diagnoses") + .HasForeignKey("ItemTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_diagnosis_item_type"); + + b.Navigation("DiagnosisLevel"); + + b.Navigation("ItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisTemplateDetail", b => + { + b.HasOne("Shentun.Peis.Models.Diagnosis", "Diagnosis") + .WithMany("DiagnosisTemplateDetails") + .HasForeignKey("DiagnosisId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_diagnos"); + + b.HasOne("Shentun.Peis.Models.DiagnosisTemplate", "DiagnosisTemplate") + .WithMany("DiagnosisTemplateDetails") + .HasForeignKey("DiagnosisTemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_diagno2"); + + b.Navigation("Diagnosis"); + + b.Navigation("DiagnosisTemplate"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.HealthCertificate", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithOne("HealthCertificate") + .HasForeignKey("Shentun.Peis.Models.HealthCertificate", "Id") + .IsRequired() + .HasConstraintName("fk_health_"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Item", b => + { + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("Items") + .HasForeignKey("ItemTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_item_type"); + + b.Navigation("ItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultMatch", b => + { + b.HasOne("Shentun.Peis.Models.Diagnosis", "Diagnosis") + .WithMany("ItemResultMatches") + .HasForeignKey("DiagnosisId") + .IsRequired() + .HasConstraintName("fk_item_result_match_diagnosis"); + + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("ItemResultMatches") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_res_reference_item1"); + + b.Navigation("Diagnosis"); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultTemplate", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("ItemResultTemplates") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_res_reference_item"); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultTemplateType", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("ItemResultTemplateTypes") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_re"); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemTemplateDetail", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("ItemTemplateDetails") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_template_detail_item"); + + b.HasOne("Shentun.Peis.Models.ItemTemplate", "ItemTemplate") + .WithMany("ItemTemplateDetails") + .HasForeignKey("ItemTemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_te"); + + b.Navigation("Item"); + + b.Navigation("ItemTemplate"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemType", b => + { + b.HasOne("Shentun.Peis.Models.GuideType", "GuidType") + .WithMany("ItemTypes") + .HasForeignKey("GuidTypeId") + .IsRequired() + .HasConstraintName("fk_item_type_guide_type"); + + b.HasOne("Shentun.Peis.Models.MedicalReportType", "MedicalReportType") + .WithMany("ItemTypes") + .HasForeignKey("MedicalReportTypeId") + .IsRequired() + .HasConstraintName("fk_item_ty"); + + b.Navigation("GuidType"); + + b.Navigation("MedicalReportType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.LisRequest", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("LisRequests") + .HasForeignKey("PatientRegisterId") + .IsRequired() + .HasConstraintName("fk_lis_request_patient_register"); + + b.HasOne("Shentun.Peis.Models.SampleContainer", "SampleContainer") + .WithMany("LisRequests") + .HasForeignKey("SampleContainerId") + .IsRequired() + .HasConstraintName("fk_lis_request_sample_container"); + + b.HasOne("Shentun.Peis.Models.SampleType", "SampleType") + .WithMany("LisRequests") + .HasForeignKey("SampleTypeId") + .IsRequired() + .HasConstraintName("fk_lis_request_sample_type"); + + b.Navigation("PatientRegister"); + + b.Navigation("SampleContainer"); + + b.Navigation("SampleType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalConclusion", b => + { + b.HasOne("Shentun.Peis.Models.MedicalConclusionType", "MedicalConclusionType") + .WithMany("MedicalConclusions") + .HasForeignKey("MedicalConclusionTypeId") + .HasConstraintName("fk_medical"); + + b.Navigation("MedicalConclusionType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalPackageDetail", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithMany("MedicalPackageDetails") + .HasForeignKey("AsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_medical"); + + b.HasOne("Shentun.Peis.Models.MedicalPackage", "MedicalPackage") + .WithMany("MedicalPackageDetails") + .HasForeignKey("MedicalPackageId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_medica2"); + + b.Navigation("Asbitem"); + + b.Navigation("MedicalPackage"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.OrganizationUnitsCustomerOrg", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrg", "CustomerOrg") + .WithMany("OrganizationUnitsCustomerOrgs") + .HasForeignKey("CustomerOrgId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_medical_center_org_org"); + + b.HasOne("Shentun.Peis.Models.Department", "OrganizationUnit") + .WithMany("OrganizationUnitsCustomerOrgs") + .HasForeignKey("OrganizationUnitId") + .IsRequired() + .HasConstraintName("fk_medical"); + + b.Navigation("CustomerOrg"); + + b.Navigation("OrganizationUnit"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientOccupationalDisease", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithOne("PatientOccupationalDisease") + .HasForeignKey("Shentun.Peis.Models.PatientOccupationalDisease", "Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_patient"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientOccupationalHistory", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("PatientOccupationalHistories") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_occupat"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientPoison", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("PatientPoisons") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_patient"); + + b.HasOne("Shentun.Peis.Models.Poison", "Poison") + .WithMany("PatientPoisons") + .HasForeignKey("PoisonId") + .IsRequired() + .HasConstraintName("fk_patient_poison_poison"); + + b.Navigation("PatientRegister"); + + b.Navigation("Poison"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientRegister", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgRegister", "CustomerOrgRegister") + .WithMany("PatientRegisters") + .HasForeignKey("CustomerOrgRegisterId") + .IsRequired() + .HasConstraintName("fk_patient_register_org_register"); + + b.HasOne("Shentun.Peis.Models.MaritalStatus", "MaritalStatus") + .WithMany("PatientRegisters") + .HasForeignKey("MaritalStatusId") + .IsRequired() + .HasConstraintName("fk_patient_register_marital_status_id"); + + b.Navigation("CustomerOrgRegister"); + + b.Navigation("MaritalStatus"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientSymptom", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("PatientSymptoms") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_patient"); + + b.HasOne("Shentun.Peis.Models.Symptom", "Symptom") + .WithMany("PatientSymptoms") + .HasForeignKey("SymptomId") + .IsRequired() + .HasConstraintName("fk_patient_symptom_symptom"); + + b.Navigation("PatientRegister"); + + b.Navigation("Symptom"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PhoneFollow", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("PhoneFollows") + .HasForeignKey("PatientRegisterId") + .IsRequired() + .HasConstraintName("fk_phone_f"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Poison", b => + { + b.HasOne("Shentun.Peis.Models.PoisonType", "PoisonType") + .WithMany("Poisons") + .HasForeignKey("PoisonTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_poison_poison_type"); + + b.Navigation("PoisonType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PriceItem", b => + { + b.HasOne("Shentun.Peis.Models.InvoiceItemType", "InvoiceItemType") + .WithMany("PriceItems") + .HasForeignKey("InvoiceItemTypeId") + .IsRequired() + .HasConstraintName("fk_price_item_invoice_item_type"); + + b.Navigation("InvoiceItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.QueueRegister", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("QueueRegisters") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_queue_r"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ReferenceRange", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("ReferenceRanges") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_referenc_reference_item"); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterAsbitem", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithMany("RegisterAsbitems") + .HasForeignKey("AsbitemId") + .IsRequired() + .HasConstraintName("fk_register_reference_asbitem"); + + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("RegisterAsbitems") + .HasForeignKey("PatientRegisterId") + .IsRequired() + .HasConstraintName("fk_register_reference_patient_"); + + b.HasOne("Shentun.Peis.Models.RegisterCheck", "RegisterCheck") + .WithMany("RegisterAsbitems") + .HasForeignKey("RegisterCheckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_registe"); + + b.Navigation("Asbitem"); + + b.Navigation("PatientRegister"); + + b.Navigation("RegisterCheck"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckItem", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("RegisterCheckItems") + .HasForeignKey("ItemId") + .IsRequired() + .HasConstraintName("fk_register_reference_item"); + + b.HasOne("Shentun.Peis.Models.RegisterCheck", "RegisterCheck") + .WithMany("RegisterCheckItems") + .HasForeignKey("RegisterCheckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_register_item_register_check"); + + b.HasOne("Shentun.Peis.Models.ResultStatus", "ResultStatus") + .WithMany("RegisterCheckItems") + .HasForeignKey("ResultStatusId") + .HasConstraintName("fk_register_item_result_status"); + + b.Navigation("Item"); + + b.Navigation("RegisterCheck"); + + b.Navigation("ResultStatus"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckPicture", b => + { + b.HasOne("Shentun.Peis.Models.RegisterCheck", "RegisterCheck") + .WithMany("RegisterCheckPictures") + .HasForeignKey("RegisterCheckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_check_picture_register_check"); + + b.Navigation("RegisterCheck"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckSuggestion", b => + { + b.HasOne("Shentun.Peis.Models.RegisterCheck", "RegisterCheck") + .WithMany("RegisterCheckSuggestions") + .HasForeignKey("RegisterCheckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_registe"); + + b.Navigation("RegisterCheck"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckSummary", b => + { + b.HasOne("Shentun.Peis.Models.RegisterCheck", "RegisterCheck") + .WithMany("RegisterCheckSummaries") + .HasForeignKey("RegisterCheckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_registe"); + + b.Navigation("RegisterCheck"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Room", b => + { + b.HasOne("Shentun.Peis.Models.Department", "Department") + .WithMany("Rooms") + .HasForeignKey("DepartmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_room_department"); + + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("Rooms") + .HasForeignKey("ItemTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_room_item_type"); + + b.Navigation("Department"); + + b.Navigation("ItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleGroup", b => + { + b.HasOne("Shentun.Peis.Models.SampleContainer", "SampleContainer") + .WithMany("SampleGroups") + .HasForeignKey("SampleContainerId") + .IsRequired() + .HasConstraintName("fk_sample_"); + + b.HasOne("Shentun.Peis.Models.SampleType", "SampleType") + .WithMany("SampleGroups") + .HasForeignKey("SampleTypeId") + .IsRequired() + .HasConstraintName("fk_sample_group_sample_type"); + + b.Navigation("SampleContainer"); + + b.Navigation("SampleType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleGroupDetail", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithOne("SampleGroupDetail") + .HasForeignKey("Shentun.Peis.Models.SampleGroupDetail", "AsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sample_group_detail_asbitem"); + + b.HasOne("Shentun.Peis.Models.SampleGroup", "SampleGroup") + .WithMany("SampleGroupDetails") + .HasForeignKey("SampleGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sample_"); + + b.Navigation("Asbitem"); + + b.Navigation("SampleGroup"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ServiceTrade", b => + { + b.HasOne("Shentun.Peis.Models.Department", "Department") + .WithMany("ServiceTrades") + .HasForeignKey("DepartmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_service_trades_department"); + + b.Navigation("Department"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SexHormoneReferenceRange", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("SexHormoneReferenceRanges") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sex_hor"); + + b.HasOne("Shentun.Peis.Models.SexHormoneTerm", "SexHormoneTerm") + .WithMany("SexHormoneReferenceRanges") + .HasForeignKey("SexHormoneTermId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sex_ho2"); + + b.Navigation("Item"); + + b.Navigation("SexHormoneTerm"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Suggestion", b => + { + b.HasOne("Shentun.Peis.Models.Diagnosis", "Diagnosis") + .WithMany("Suggestions") + .HasForeignKey("DiagnosisId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_suggestion_diagnosis"); + + b.Navigation("Diagnosis"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumDiagnosis", b => + { + b.HasOne("Shentun.Peis.Models.Diagnosis", "Diagnosis") + .WithMany("SumDiagnoses") + .HasForeignKey("DiagnosisId") + .IsRequired() + .HasConstraintName("fk_sum_diagnosis_diagnosis"); + + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("SumDiagnoses") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sum_dia"); + + b.Navigation("Diagnosis"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSuggestionContent", b => + { + b.HasOne("Shentun.Peis.Models.SumSuggestionHeader", "SumSuggestionHeader") + .WithMany("SumSuggestionContents") + .HasForeignKey("SumSuggestionHeaderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sum_sug"); + + b.Navigation("SumSuggestionHeader"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSuggestionHeader", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("SumSuggestionHeaders") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sum_sug"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSummaryContent", b => + { + b.HasOne("Shentun.Peis.Models.SumSummaryHeader", "SumSummaryHeader") + .WithMany("SumSummaryContents") + .HasForeignKey("SumSummaryHeaderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sum_sum"); + + b.Navigation("SumSummaryHeader"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSummaryHeader", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("SumSummaryHeaders") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sum_sum"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParm", b => + { + b.HasOne("Shentun.Peis.Models.SysParmType", "SysParmType") + .WithMany("SysParms") + .HasForeignKey("SysParmTypeId") + .HasConstraintName("fk_sys_parm_sys_parm_type"); + + b.Navigation("SysParmType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmValue", b => + { + b.HasOne("Shentun.Peis.Models.SysParm", "SysParm") + .WithMany("SysParmValues") + .HasForeignKey("SysParmId") + .IsRequired() + .HasConstraintName("fk_sys_parm_value_sys_parm"); + + b.Navigation("SysParm"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmValueOption", b => + { + b.HasOne("Shentun.Peis.Models.SysParm", "SysParm") + .WithMany("SysParmValueOptions") + .HasForeignKey("SysParmId") + .IsRequired() + .HasConstraintName("fk_sys_par"); + + b.Navigation("SysParm"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.User", b => + { + b.HasOne("Shentun.Peis.Models.Department", "Department") + .WithMany("Users") + .HasForeignKey("DepartmentId") + .IsRequired() + .HasConstraintName("fk_user_department"); + + b.Navigation("Department"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserDepartment", b => + { + b.HasOne("Shentun.Peis.Models.Department", "Department") + .WithMany("UserDepartments") + .HasForeignKey("DepartmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_op"); + + b.HasOne("Shentun.Peis.Models.User", "User") + .WithMany("UserDepartments") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_o2"); + + b.Navigation("Department"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserGrouping", b => + { + b.HasOne("Shentun.Peis.Models.Grouping", "Grouping") + .WithMany("UserGroupings") + .HasForeignKey("GroupingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_grouping_grouping"); + + b.HasOne("Shentun.Peis.Models.User", "User") + .WithMany("UserGroupings") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_grouping_users"); + + b.Navigation("Grouping"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserItemType", b => + { + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("UserItemTypes") + .HasForeignKey("ItemTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_item_type_item_type"); + + b.HasOne("Shentun.Peis.Models.User", "User") + .WithMany("UserItemTypes") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_item_type_users"); + + b.Navigation("ItemType"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("Actions") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("EntityChanges") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.EntityChange", null) + .WithMany("PropertyChanges") + .HasForeignKey("EntityChangeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany("Claims") + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Claims") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Logins") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("OrganizationUnits") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Roles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Tokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("ParentId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany("Roles") + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + + b.HasOne("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", null) + .WithMany() + .HasForeignKey("AuthorizationId"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.HasOne("Volo.Abp.TenantManagement.Tenant", null) + .WithMany("ConnectionStrings") + .HasForeignKey("TenantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Shentun.Peis.Books.HelloType", b => + { + b.Navigation("HelloAs"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.TestA", b => + { + b.Navigation("TestBs"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Asbitem", b => + { + b.Navigation("AsbitemDetails"); + + b.Navigation("ChargeAsbitems"); + + b.Navigation("CustomerOrgGroupDetails"); + + b.Navigation("MedicalPackageDetails"); + + b.Navigation("RegisterAsbitems"); + + b.Navigation("SampleGroupDetail"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultTemplate", b => + { + b.Navigation("BigtextResultConclusions"); + + b.Navigation("BigtextResultDescriptions"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultType", b => + { + b.Navigation("BigtextResultTemplates"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardRegister", b => + { + b.Navigation("CardBills"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardType", b => + { + b.Navigation("CardRegisters"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Charge", b => + { + b.Navigation("ChargeAsbitems"); + + b.Navigation("ChargeBacks"); + + b.Navigation("ChargePays"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeAsbitem", b => + { + b.Navigation("ChargePriceItems"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeBack", b => + { + b.Navigation("ChargeBackPays"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CommonCharType", b => + { + b.Navigation("CommonChars"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ContactPerson", b => + { + b.Navigation("ContactMethods"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CriticalValueType", b => + { + b.Navigation("CriticalValues"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrg", b => + { + b.Navigation("ContactPeople"); + + b.Navigation("CustomerOrgRegisters"); + + b.Navigation("OrganizationUnitsCustomerOrgs"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgCharge", b => + { + b.Navigation("CustomerOrgChargeBacks"); + + b.Navigation("CustomerOrgChargePay"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargeBack", b => + { + b.Navigation("CustomerOrgChargeBackPays"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgGroup", b => + { + b.Navigation("CustomerOrgGroupDetails"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgRegister", b => + { + b.Navigation("CustomerOrgCharges"); + + b.Navigation("CustomerOrgGroups"); + + b.Navigation("PatientRegisters"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Department", b => + { + b.Navigation("CardRegisters"); + + b.Navigation("OrganizationUnitsCustomerOrgs"); + + b.Navigation("Rooms"); + + b.Navigation("ServiceTrades"); + + b.Navigation("UserDepartments"); + + b.Navigation("Users"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Diagnosis", b => + { + b.Navigation("DiagnosisTemplateDetails"); + + b.Navigation("ItemResultMatches"); + + b.Navigation("Suggestions"); + + b.Navigation("SumDiagnoses"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisLevel", b => + { + b.Navigation("Diagnoses"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisTemplate", b => + { + b.Navigation("DiagnosisTemplateDetails"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Grouping", b => + { + b.Navigation("UserGroupings"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.GuideType", b => + { + b.Navigation("ItemTypes"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.InvoiceItemType", b => + { + b.Navigation("Asbitems"); + + b.Navigation("PriceItems"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Item", b => + { + b.Navigation("AsbitemDetails"); + + b.Navigation("ItemResultMatches"); + + b.Navigation("ItemResultTemplateTypes"); + + b.Navigation("ItemResultTemplates"); + + b.Navigation("ItemTemplateDetails"); + + b.Navigation("ReferenceRanges"); + + b.Navigation("RegisterCheckItems"); + + b.Navigation("SexHormoneReferenceRanges"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemTemplate", b => + { + b.Navigation("ItemTemplateDetails"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemType", b => + { + b.Navigation("Asbitems"); + + b.Navigation("BigtextResultTypes"); + + b.Navigation("Diagnoses"); + + b.Navigation("Items"); + + b.Navigation("Rooms"); + + b.Navigation("UserItemTypes"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MaritalStatus", b => + { + b.Navigation("PatientRegisters"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalConclusionType", b => + { + b.Navigation("MedicalConclusions"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalPackage", b => + { + b.Navigation("MedicalPackageDetails"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalReportType", b => + { + b.Navigation("ItemTypes"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientRegister", b => + { + b.Navigation("Charges"); + + b.Navigation("HealthCertificate"); + + b.Navigation("LisRequests"); + + b.Navigation("PatientOccupationalDisease"); + + b.Navigation("PatientOccupationalHistories"); + + b.Navigation("PatientPoisons"); + + b.Navigation("PatientSymptoms"); + + b.Navigation("PhoneFollows"); + + b.Navigation("QueueRegisters"); + + b.Navigation("RegisterAsbitems"); + + b.Navigation("SumDiagnoses"); + + b.Navigation("SumSuggestionHeaders"); + + b.Navigation("SumSummaryHeaders"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PayMode", b => + { + b.Navigation("CardBills"); + + b.Navigation("ChargeBackPays"); + + b.Navigation("ChargePays"); + + b.Navigation("CustomerOrgChargeBackPays"); + + b.Navigation("CustomerOrgChargePays"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Poison", b => + { + b.Navigation("PatientPoisons"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PoisonType", b => + { + b.Navigation("Poisons"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheck", b => + { + b.Navigation("RegisterAsbitems"); + + b.Navigation("RegisterCheckItems"); + + b.Navigation("RegisterCheckPictures"); + + b.Navigation("RegisterCheckSuggestions"); + + b.Navigation("RegisterCheckSummaries"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ResultStatus", b => + { + b.Navigation("RegisterCheckItems"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleContainer", b => + { + b.Navigation("LisRequests"); + + b.Navigation("SampleGroups"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleGroup", b => + { + b.Navigation("SampleGroupDetails"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleType", b => + { + b.Navigation("LisRequests"); + + b.Navigation("SampleGroups"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SexHormoneTerm", b => + { + b.Navigation("SexHormoneReferenceRanges"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSuggestionHeader", b => + { + b.Navigation("SumSuggestionContents"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSummaryHeader", b => + { + b.Navigation("SumSummaryContents"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Symptom", b => + { + b.Navigation("PatientSymptoms"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParm", b => + { + b.Navigation("SysParmValueOptions"); + + b.Navigation("SysParmValues"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmType", b => + { + b.Navigation("SysParms"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.User", b => + { + b.Navigation("UserDepartments"); + + b.Navigation("UserGroupings"); + + b.Navigation("UserItemTypes"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Navigation("Actions"); + + b.Navigation("EntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Navigation("PropertyChanges"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Navigation("Claims"); + + b.Navigation("Logins"); + + b.Navigation("OrganizationUnits"); + + b.Navigation("Roles"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Navigation("Roles"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230619080014_sss1.cs b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230619080014_sss1.cs new file mode 100644 index 00000000..cfe6729a --- /dev/null +++ b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230619080014_sss1.cs @@ -0,0 +1,434 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Shentun.Peis.Migrations +{ + public partial class sss1 : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "short_name", + table: "asbitem", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "简称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "queue_time", + table: "asbitem", + type: "numeric(3,1)", + precision: 3, + scale: 1, + nullable: false, + comment: "候诊时间", + oldClrType: typeof(decimal), + oldType: "numeric(3,1)", + oldPrecision: 3, + oldScale: 1); + + migrationBuilder.AlterColumn( + name: "price", + table: "asbitem", + type: "numeric(8,2)", + precision: 8, + scale: 2, + nullable: false, + comment: "价格", + oldClrType: typeof(decimal), + oldType: "numeric(8,2)", + oldPrecision: 8, + oldScale: 2); + + migrationBuilder.AlterColumn( + name: "item_type_id", + table: "asbitem", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "项目类别", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "is_picture_rotate", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "体检报告图片旋转90°", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_item_result_merger", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "项目结果合并", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_diagnosis_function", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "启用诊断函数", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_continue_process", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "诊断函数处理完毕后继续处理", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_check", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是检查项目", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_before_eat", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "餐前项目", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_active", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是启用", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "invoice_item_type_id", + table: "asbitem", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "发票类别", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "for_sex_id", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "'A'::bpchar", + comment: "适用性别,M-男,F-女,A-全部", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "'A'::bpchar"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "asbitem", + type: "character varying(30)", + maxLength: 30, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(30)", + oldMaxLength: 30, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "diagnosis_function", + table: "asbitem", + type: "character varying(1000)", + maxLength: 1000, + nullable: true, + comment: "诊断函数", + oldClrType: typeof(string), + oldType: "character varying(1000)", + oldMaxLength: 1000, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "device_type_id", + table: "asbitem", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "仪器类别", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "default_result", + table: "asbitem", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "默认结果", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "clinical_meaning", + table: "asbitem", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "临床意义", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "short_name", + table: "asbitem", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "简称"); + + migrationBuilder.AlterColumn( + name: "queue_time", + table: "asbitem", + type: "numeric(3,1)", + precision: 3, + scale: 1, + nullable: false, + oldClrType: typeof(decimal), + oldType: "numeric(3,1)", + oldPrecision: 3, + oldScale: 1, + oldComment: "候诊时间"); + + migrationBuilder.AlterColumn( + name: "price", + table: "asbitem", + type: "numeric(8,2)", + precision: 8, + scale: 2, + nullable: false, + oldClrType: typeof(decimal), + oldType: "numeric(8,2)", + oldPrecision: 8, + oldScale: 2, + oldComment: "价格"); + + migrationBuilder.AlterColumn( + name: "item_type_id", + table: "asbitem", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "项目类别"); + + migrationBuilder.AlterColumn( + name: "is_picture_rotate", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "体检报告图片旋转90°"); + + migrationBuilder.AlterColumn( + name: "is_item_result_merger", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "项目结果合并"); + + migrationBuilder.AlterColumn( + name: "is_diagnosis_function", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "启用诊断函数"); + + migrationBuilder.AlterColumn( + name: "is_continue_process", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "诊断函数处理完毕后继续处理"); + + migrationBuilder.AlterColumn( + name: "is_check", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是检查项目"); + + migrationBuilder.AlterColumn( + name: "is_before_eat", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "餐前项目"); + + migrationBuilder.AlterColumn( + name: "is_active", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是启用"); + + migrationBuilder.AlterColumn( + name: "invoice_item_type_id", + table: "asbitem", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "发票类别"); + + migrationBuilder.AlterColumn( + name: "for_sex_id", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "'A'::bpchar", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "'A'::bpchar", + oldComment: "适用性别,M-男,F-女,A-全部"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "asbitem", + type: "character varying(30)", + maxLength: 30, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(30)", + oldMaxLength: 30, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "diagnosis_function", + table: "asbitem", + type: "character varying(1000)", + maxLength: 1000, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(1000)", + oldMaxLength: 1000, + oldNullable: true, + oldComment: "诊断函数"); + + migrationBuilder.AlterColumn( + name: "device_type_id", + table: "asbitem", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "仪器类别"); + + migrationBuilder.AlterColumn( + name: "default_result", + table: "asbitem", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "默认结果"); + + migrationBuilder.AlterColumn( + name: "clinical_meaning", + table: "asbitem", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "临床意义"); + } + } +} diff --git a/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230619083032_zmremark.Designer.cs b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230619083032_zmremark.Designer.cs new file mode 100644 index 00000000..d7c97a55 --- /dev/null +++ b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230619083032_zmremark.Designer.cs @@ -0,0 +1,10981 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; +using Shentun.Peis.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Shentun.Peis.Migrations +{ + [DbContext(typeof(PeisDbContext))] + [Migration("20230619083032_zmremark")] + partial class zmremark + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.PostgreSql) + .HasAnnotation("ProductVersion", "6.0.5") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("AsbitemRoom", b => + { + b.Property("AsbitemId") + .HasColumnType("uuid"); + + b.Property("RoomId") + .HasColumnType("uuid"); + + b.HasKey("AsbitemId", "RoomId"); + + b.ToTable("AsbitemRoom"); + }); + + modelBuilder.Entity("ChildDiagnosis", b => + { + b.Property("ParentDiagnosisId") + .HasMaxLength(8) + .HasColumnType("uuid") + .HasColumnName("parent_diagnosis_id") + .IsFixedLength(); + + b.Property("DiagnosisId") + .HasMaxLength(8) + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength(); + + b.HasKey("ParentDiagnosisId", "DiagnosisId") + .HasName("pk_child_diagnosis"); + + b.HasIndex("DiagnosisId"); + + b.ToTable("child_diagnosis", (string)null); + + b.HasComment("子诊断"); + }); + + modelBuilder.Entity("DiagnosisDiagnosis", b => + { + b.Property("DiagnosisId") + .HasColumnType("uuid"); + + b.Property("ParentDiagnosisId") + .HasColumnType("uuid"); + + b.HasKey("DiagnosisId", "ParentDiagnosisId"); + + b.ToTable("DiagnosisDiagnosis"); + }); + + modelBuilder.Entity("RoomAsbitem", b => + { + b.Property("RoomId") + .HasMaxLength(5) + .HasColumnType("uuid") + .HasColumnName("room_id") + .IsFixedLength(); + + b.Property("AsbitemId") + .HasMaxLength(6) + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength(); + + b.HasKey("RoomId", "AsbitemId") + .HasName("pk_room_asbitem"); + + b.HasIndex("AsbitemId"); + + b.ToTable("room_asbitem", (string)null); + + b.HasComment("房间包含组合项目设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.HelloA", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ADesc") + .HasColumnType("text") + .HasColumnName("a_desc"); + + b.Property("AName") + .ValueGeneratedOnAdd() + .HasColumnType("text") + .HasDefaultValue("默认值") + .HasColumnName("a_name"); + + b.Property("AddTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("add_time") + .HasDefaultValueSql("now()"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("HelloTypeId") + .HasColumnType("uuid") + .HasColumnName("hello_type_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("HelloTypeId"); + + b.ToTable("hello_a"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.HelloType", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("TypeName") + .HasColumnType("text") + .HasColumnName("type_name") + .HasComment("类型名称"); + + b.HasKey("Id"); + + b.ToTable("hello_type"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.Student", b => + { + b.Property("Sid") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("sid"); + + b.Property("Cid") + .HasColumnType("text"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasColumnType("text"); + + b.Property("Uid") + .HasColumnType("uuid"); + + b.HasKey("Sid"); + + b.ToTable("student"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.TestA", b => + { + b.Property("AId") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("AName") + .HasColumnType("text"); + + b.HasKey("AId"); + + b.ToTable("testa"); + + b.HasComment("组合项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.TestB", b => + { + b.Property("BId") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("AId") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("AName") + .HasColumnType("text"); + + b.Property("TestAsAId") + .HasColumnType("uuid"); + + b.HasKey("BId"); + + b.HasIndex("TestAsAId"); + + b.ToTable("testb"); + + b.HasComment("组合项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Asbitem", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("ClinicalMeaning") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("clinical_meaning") + .HasComment("临床意义"); + + b.Property("CreationTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DefaultResult") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("default_result") + .HasComment("默认结果"); + + b.Property("DeviceTypeId") + .HasColumnType("uuid") + .HasColumnName("device_type_id") + .IsFixedLength() + .HasComment("仪器类别"); + + b.Property("DiagnosisFunction") + .HasMaxLength(1000) + .HasColumnType("character varying(1000)") + .HasColumnName("diagnosis_function") + .HasComment("诊断函数"); + + b.Property("DisplayName") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar") + .HasComment("适用性别,M-男,F-女,A-全部"); + + b.Property("InvoiceItemTypeId") + .HasColumnType("uuid") + .HasColumnName("invoice_item_type_id") + .IsFixedLength() + .HasComment("发票类别"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active") + .HasComment("是启用"); + + b.Property("IsBeforeEat") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_before_eat") + .HasComment("餐前项目"); + + b.Property("IsCheck") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_check") + .HasComment("是检查项目"); + + b.Property("IsContinueProcess") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_continue_process") + .HasComment("诊断函数处理完毕后继续处理"); + + b.Property("IsDiagnosisFunction") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_diagnosis_function") + .HasComment("启用诊断函数"); + + b.Property("IsItemResultMerger") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_item_result_merger") + .HasComment("项目结果合并"); + + b.Property("IsPictureRotate") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_picture_rotate") + .HasComment("体检报告图片旋转90°"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength() + .HasComment("项目类别"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Price") + .HasPrecision(8, 2) + .HasColumnType("numeric(8,2)") + .HasColumnName("price") + .HasComment("价格"); + + b.Property("QueueTime") + .HasPrecision(3, 1) + .HasColumnType("numeric(3,1)") + .HasColumnName("queue_time") + .HasComment("候诊时间"); + + b.Property("ShortName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("short_name") + .HasComment("简称"); + + b.Property("SimpleCode") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("InvoiceItemTypeId"); + + b.HasIndex("ItemTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_asbitem") + .IsUnique(); + + b.ToTable("asbitem"); + + b.HasComment("组合项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.AsbitemDetail", b => + { + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength(); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编码"); + + b.HasKey("AsbitemId", "ItemId") + .HasName("pk_department_asbitem_detail"); + + b.HasIndex("ItemId"); + + b.ToTable("asbitem_detail"); + + b.HasComment("组合项目包含项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.AsbitemGuide", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id") + .IsFixedLength() + .HasComment("单位科室ID"); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength() + .HasComment("组合项目ID"); + + b.Property("ForSexId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasComment("适用性别ID"); + + b.Property("Guide") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("guide") + .HasComment("指引单内容"); + + b.HasKey("OrganizationUnitId", "AsbitemId", "ForSexId") + .HasName("pk_department_asbitem_guide"); + + b.ToTable("asbitem_guide"); + + b.HasComment("体检中心组和项目指引内容"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.AsbitemPriceItem", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("Amount") + .HasColumnType("smallint") + .HasColumnName("amount") + .HasComment("数量"); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength() + .HasComment("组合项目编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PriceItemId") + .HasColumnType("uuid") + .HasColumnName("price_item_id") + .IsFixedLength() + .HasComment("价表项目编码"); + + b.HasKey("Id"); + + b.ToTable("asbitem_price_item"); + + b.HasComment("组和项目包含价表项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultConclusion", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("BigtextResultTemplateId") + .HasColumnType("uuid") + .HasColumnName("bigtext_result_template_id") + .IsFixedLength(); + + b.Property("Conclusion") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("conclusion") + .HasComment("结论"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("BigtextResultTemplateId"); + + b.ToTable("bigtext_result_conclusion"); + + b.HasComment("大文本结果结论"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultDescription", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("BigtextResultTemplateId") + .HasColumnType("uuid") + .HasColumnName("bigtext_result_template_id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("description") + .HasComment("描述"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("BigtextResultTemplateId"); + + b.ToTable("bigtext_result_description"); + + b.HasComment("大文本结果描述"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("BigtextResultTypeId") + .HasColumnType("uuid") + .HasColumnName("bigtext_result_type_id") + .IsFixedLength() + .HasComment("结果类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("BigtextResultTypeId"); + + b.ToTable("bigtext_result_template"); + + b.HasComment("大文本结果模板"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength() + .HasComment("项目类别"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength() + .HasComment("父编号"); + + b.Property("PathCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("path_code") + .HasComment("路径编码"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("ItemTypeId"); + + b.ToTable("bigtext_result_type"); + + b.HasComment("大文本结果类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BirthPlace", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CountryCode") + .HasMaxLength(6) + .HasColumnType("character varying(6)") + .HasColumnName("country_code") + .HasComment("国家标准码"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_birth_place") + .IsUnique(); + + b.ToTable("birth_place"); + + b.HasComment("出生地"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardBill", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("编号"); + + b.Property("BillFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("bill_flag") + .HasDefaultValueSql("'0'::bpchar") + .HasComment("记账标志"); + + b.Property("BillMoney") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("bill_money") + .HasComment("记账金额"); + + b.Property("CardRegisterId") + .HasColumnType("uuid") + .HasColumnName("card_register_id") + .HasComment("卡登记编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PayModeId") + .ValueGeneratedOnAdd() + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("pay_mode_id") + .HasDefaultValueSql("'1'::bpchar") + .IsFixedLength() + .HasComment("支付方式"); + + b.HasKey("Id"); + + b.HasIndex("CardRegisterId"); + + b.HasIndex("PayModeId"); + + b.ToTable("card_bill"); + + b.HasComment("卡记账记录"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardRegister", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("编号"); + + b.Property("CardFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("card_flag") + .HasDefaultValueSql("0") + .HasComment("使用标志"); + + b.Property("CardNo") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("card_no") + .HasComment("卡号"); + + b.Property("CardPassword") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("card_password"); + + b.Property("CardTypeId") + .HasColumnType("uuid") + .HasColumnName("card_type_id") + .IsFixedLength() + .HasComment("卡类型"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("customer_name") + .HasComment("领用者"); + + b.Property("Discount") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("discount") + .HasDefaultValueSql("100") + .HasComment("折扣"); + + b.Property("ExpiryDate") + .HasColumnType("date") + .HasColumnName("expiry_date") + .HasComment("有效期"); + + b.Property("IdNo") + .HasMaxLength(18) + .HasColumnType("character varying(18)") + .HasColumnName("id_no") + .HasComment("身份证号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MobileTelephone") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("mobile_telephone") + .HasComment("手机"); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id") + .IsFixedLength(); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("Telephone") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("telephone") + .HasComment("电话"); + + b.HasKey("Id"); + + b.HasIndex("CardTypeId"); + + b.HasIndex("OrganizationUnitId"); + + b.HasIndex(new[] { "CardNo", "CardFlag" }, "ix_card_register") + .IsUnique(); + + b.ToTable("card_register"); + + b.HasComment("会员卡登记"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("CardModeId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("card_mode_id") + .HasDefaultValueSql("0") + .HasComment("卡模式"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("Discount") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("discount") + .HasDefaultValueSql("100") + .HasComment("折扣"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("ExpiryDay") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("expiry_day") + .HasDefaultValueSql("3650") + .HasComment("有效期"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark") + .HasComment("备注"); + + b.HasKey("Id"); + + b.ToTable("card_type"); + + b.HasComment("会员卡类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Charge", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("收据号"); + + b.Property("ChargeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("charge_flag") + .HasDefaultValueSql("0"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("InvoiceNo") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("invoice_no"); + + b.Property("InvoiceOrgName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("invoice_org_name"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("登记流水号"); + + b.Property("SettleAccountId") + .HasColumnType("uuid") + .HasColumnName("settle_account_id") + .HasComment("结账ID"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "PatientRegisterId" }, "fki_fk_patient_register_charge"); + + b.HasIndex(new[] { "PatientRegisterId" }, "ix_charge"); + + b.ToTable("charge"); + + b.HasComment("收费主档"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeAsbitem", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Amount") + .HasColumnType("smallint") + .HasColumnName("amount"); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength() + .HasComment("组合项目"); + + b.Property("ChargeId") + .HasColumnType("uuid") + .HasColumnName("charge_id") + .HasComment("收据号"); + + b.Property("ChargePrice") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_price") + .HasComment("价格"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("RegisterAsbitemId") + .HasColumnType("uuid") + .HasColumnName("register_asbitem_id"); + + b.HasKey("Id"); + + b.HasIndex("AsbitemId"); + + b.HasIndex("ChargeId"); + + b.ToTable("charge_asbitem"); + + b.HasComment("收费包含组合项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeBack", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("退费编号"); + + b.Property("ChargeId") + .HasColumnType("uuid") + .HasColumnName("charge_id") + .HasComment("收据号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SettleAccountId") + .HasColumnType("uuid") + .HasColumnName("settle_account_id") + .HasComment("结账ID"); + + b.HasKey("Id"); + + b.HasIndex("ChargeId"); + + b.ToTable("charge_back"); + + b.HasComment("退费主档"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeBackPay", b => + { + b.Property("ChargeBackId") + .HasColumnType("uuid") + .HasColumnName("charge_back_id"); + + b.Property("PayModeId") + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("pay_mode_id") + .IsFixedLength() + .HasComment("支付方式ID"); + + b.Property("BackMoeny") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("back_moeny") + .HasComment("退费金额"); + + b.HasKey("ChargeBackId", "PayModeId") + .HasName("pk_department_charge_back_pay"); + + b.HasIndex("PayModeId"); + + b.ToTable("charge_back_pay"); + + b.HasComment("退费支付方式"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargePay", b => + { + b.Property("ChargeId") + .HasColumnType("uuid") + .HasColumnName("charge_id") + .HasComment("收据号"); + + b.Property("PayModeId") + .ValueGeneratedOnAdd() + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("pay_mode_id") + .HasDefaultValueSql("'1'::bpchar") + .IsFixedLength() + .HasComment("支付方式"); + + b.Property("CardBillId") + .HasColumnType("uuid") + .HasColumnName("card_bill_id"); + + b.Property("ChargeMoney") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_money") + .HasComment("金额"); + + b.HasKey("ChargeId", "PayModeId") + .HasName("pk_department_charge_pay"); + + b.HasIndex("PayModeId"); + + b.ToTable("charge_pay"); + + b.HasComment("收费支付方式"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargePriceItem", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Amount") + .HasColumnType("smallint") + .HasColumnName("amount"); + + b.Property("ChargeAsbitemId") + .HasColumnType("uuid") + .HasColumnName("charge_asbitem_id"); + + b.Property("ChargePrice") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_price"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PriceItemId") + .HasColumnType("uuid") + .HasColumnName("price_item_id"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "ChargeAsbitemId" }, "fki_fk_charge_asbitem"); + + b.HasIndex(new[] { "ChargeAsbitemId", "PriceItemId" }, "ix_charge_price_item"); + + b.ToTable("charge_price_item"); + + b.HasComment("收费价表项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CommonChar", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CommonCharTypeId") + .HasColumnType("uuid") + .HasColumnName("common_char_type_id") + .IsFixedLength() + .HasComment("常用字符类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(1) + .HasColumnType("character varying(1)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(1) + .HasColumnType("character varying(1)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("CommonCharTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_common_char") + .IsUnique(); + + b.ToTable("common_char"); + + b.HasComment("常用字符"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CommonCharType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_common_char_type") + .IsUnique(); + + b.ToTable("common_char_type"); + + b.HasComment("常用字符类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ContactMethod", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ContactMethodType") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("contact_method_type") + .HasDefaultValueSql("'M'::bpchar") + .HasComment("联系方式类别-比如0-手机、1-电子邮箱"); + + b.Property("ContactMethodValue") + .HasMaxLength(15) + .HasColumnType("character varying(15)") + .HasColumnName("contact_method_value") + .HasComment("联系方式,比如18911254911,839860190@qq.com"); + + b.Property("ContactPersonId") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("ContactPersonId"); + + b.ToTable("contact_method"); + + b.HasComment("联系方式新增量主键,更新映射关系"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ContactPerson", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgId") + .HasColumnType("uuid") + .HasColumnName("customer_org_id") + .IsFixedLength() + .HasComment("客户单位编号"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("姓名"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("Title") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("title") + .HasComment("职务"); + + b.HasKey("Id"); + + b.HasIndex("CustomerOrgId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_contact"); + + b.HasIndex(new[] { "SimpleCode" }, "ix_contact_simple_code"); + + b.ToTable("contact_person"); + + b.HasComment("联系人"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CriticalValue", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CriticalValueTypeId") + .HasColumnType("uuid") + .HasColumnName("critical_value_type_id") + .IsFixedLength() + .HasComment("危急值类别编号"); + + b.Property("DisplayName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("CriticalValueTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_critical_value") + .IsUnique(); + + b.ToTable("critical_value"); + + b.HasComment("危急值关键字设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CriticalValueType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength() + .HasComment("父编号"); + + b.Property("PathCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("path_code") + .HasComment("路径编码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_critical_value_type") + .IsUnique(); + + b.ToTable("critical_value_type"); + + b.HasComment("危急值类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrg", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("单位ID"); + + b.Property("Accounts") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("accounts") + .HasComment("银行帐号"); + + b.Property("Address") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("address") + .HasComment("联系地址"); + + b.Property("Bank") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("bank") + .HasComment("业务银行"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("单位名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("Fax") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("fax") + .HasComment("传真"); + + b.Property("InvoiceName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("invoice_name") + .HasComment("开票名称"); + + b.Property("IsLock") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_lock") + .HasComment("锁住"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OrgTypeId") + .HasColumnType("uuid") + .HasColumnName("org_type_id") + .IsFixedLength() + .HasComment("单位性质"); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength() + .HasComment("父编号"); + + b.Property("PathCode") + .HasMaxLength(60) + .HasColumnType("character varying(60)") + .HasColumnName("path_code") + .HasComment("路径编码"); + + b.Property("PostalCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("postal_code") + .HasComment("邮政编码"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("ShortName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("short_name") + .HasComment("简称"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code") + .HasComment("拼音简码"); + + b.Property("StatusFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("status_flag") + .HasDefaultValueSql("0") + .HasComment("状态"); + + b.Property("Telephone") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("telephone") + .HasComment("联系电话"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "OrganizationUnitId" }, "fki_fk_customer_org_organization_units"); + + b.HasIndex(new[] { "ParentId", "DisplayName" }, "ix_org") + .IsUnique(); + + b.ToTable("customer_org"); + + b.HasComment("团检单位设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgCharge", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ChargeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("charge_flag") + .HasComment("收退费标志"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgRegisterId") + .HasColumnType("uuid") + .HasColumnName("customer_org_register_id") + .HasComment("客户单位登记ID"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Payer") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("payer") + .HasComment("付款人"); + + b.Property("SettleAccountId") + .HasColumnType("uuid") + .HasColumnName("settle_account_id") + .HasComment("结算账户ID"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "CustomerOrgRegisterId" }, "fki_fk_customer_org_charge_register"); + + b.ToTable("customer_org_charge"); + + b.HasComment("团检单位收费"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargeBack", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgChargeId") + .HasColumnType("uuid") + .HasColumnName("customer_org_charge_id") + .HasComment("收费编号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SettleAccountId") + .HasColumnType("uuid") + .HasColumnName("settle_account_id") + .HasComment("结算账户ID"); + + b.HasKey("Id"); + + b.HasIndex("CustomerOrgChargeId"); + + b.ToTable("customer_org_charge_back"); + + b.HasComment("团检单位退费"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargeBackPay", b => + { + b.Property("CustomerOrgChargeBackId") + .HasColumnType("uuid") + .HasColumnName("customer_org_charge_back_id"); + + b.Property("PayModeId") + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("pay_mode_id") + .IsFixedLength() + .HasComment("支付方式"); + + b.Property("BackMoeny") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("back_moeny") + .HasComment("退费金额"); + + b.HasKey("CustomerOrgChargeBackId", "PayModeId") + .HasName("pk_org_charge_back_pay"); + + b.HasIndex("PayModeId"); + + b.ToTable("customer_org_charge_back_pay"); + + b.HasComment("团结退费支付方式"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargePay", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ChargeMoney") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_money") + .HasComment("支付金额"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PayModeId") + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("pay_mode_id") + .IsFixedLength() + .HasComment("支付方式"); + + b.HasKey("Id"); + + b.HasIndex("PayModeId"); + + b.ToTable("customer_org_charge_pay"); + + b.HasComment("团检收费支付方式"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgGroup", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("分组编号"); + + b.Property("AgeLowerLimit") + .HasColumnType("smallint") + .HasColumnName("age_lower_limit") + .HasComment("适用年龄下限"); + + b.Property("AgeUpperLimit") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasColumnName("age_upper_limit") + .HasDefaultValueSql("120") + .HasComment("适用年龄上限"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgRegisterId") + .HasColumnType("uuid") + .HasColumnName("customer_org_register_id"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("分组名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar") + .HasComment("适用性别"); + + b.Property("JobPost") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("job_post") + .HasComment("适用职务"); + + b.Property("JobTitle") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("job_title") + .HasComment("适用职称"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MaritalStatusId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("marital_status_id") + .HasComment("适用婚姻状况"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price") + .HasComment("价格"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark") + .HasComment("备注"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "CustomerOrgRegisterId" }, "fki_fk_customer_org_group_register"); + + b.ToTable("customer_org_group"); + + b.HasComment("团体分组主档"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgGroupDetail", b => + { + b.Property("CustomerOrgGroupId") + .HasColumnType("uuid") + .HasColumnName("customer_org_group_id") + .IsFixedLength() + .HasComment("分组编号"); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength() + .HasComment("组合项目编号"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price") + .HasComment("价格"); + + b.HasKey("CustomerOrgGroupId", "AsbitemId") + .HasName("pk_org_group_detail"); + + b.HasIndex("AsbitemId"); + + b.ToTable("customer_org_group_detail"); + + b.HasComment("团检分组包含组合项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgRegister", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("BeginTime") + .ValueGeneratedOnAdd() + .HasColumnType("date") + .HasColumnName("begin_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)") + .HasComment("开始日期"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgId") + .HasColumnType("uuid") + .HasColumnName("customer_org_id") + .IsFixedLength() + .HasComment("单位编号"); + + b.Property("EndTime") + .HasColumnType("date") + .HasColumnName("end_time") + .HasComment("结束日期"); + + b.Property("IsComplete") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_complete") + .HasComment("完成标志"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MedicalTimes") + .HasColumnType("smallint") + .HasColumnName("medical_times") + .HasComment("单位体检次数"); + + b.Property("RegisterName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("register_name") + .HasComment("计划名称"); + + b.Property("RegisterNo") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("register_no") + .HasComment("计划号"); + + b.HasKey("Id"); + + b.HasIndex("CustomerOrgId"); + + b.ToTable("customer_org_register"); + + b.HasComment("团检体检登记"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_org_type") + .IsUnique(); + + b.ToTable("customer_org_type"); + + b.HasComment("客户单位类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Department", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CodePrefix") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("code_prefix"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DepartmentTypeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("department_type_flag"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasMaxLength(4) + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength(); + + b.Property("PathCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("path_code"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName", "ParentId" }, "ix_department") + .IsUnique(); + + b.ToTable("department"); + + b.HasComment("部门,已经废弃"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DeviceType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("仪器类别编号"); + + b.Property("CheckTypeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("check_type_flag"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("仪器类别名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.ToTable("device_type"); + + b.HasComment("仪器类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Diagnosis", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DiagnosisLevelId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_level_id") + .HasComment("诊断级别"); + + b.Property("DisplayName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar") + .HasComment("适用性别"); + + b.Property("IsIll") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_ill") + .HasComment("是疾病"); + + b.Property("IsSummaryTemplate") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_summary_template") + .HasComment("是总检模板"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength() + .HasComment("项目类别"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("simple_code"); + + b.Property("SuggestionName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("suggestion_name") + .HasComment("建议名称"); + + b.HasKey("Id"); + + b.HasIndex("DiagnosisLevelId"); + + b.HasIndex("ItemTypeId"); + + b.ToTable("diagnosis"); + + b.HasComment("诊断设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisLevel", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.ToTable("diagnosis_level"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisPostfix", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_diagnosis_postfix") + .IsUnique(); + + b.ToTable("diagnosis_postfix"); + + b.HasComment("诊断后缀设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_diagnosis_template") + .IsUnique(); + + b.ToTable("diagnosis_template"); + + b.HasComment("诊断模板设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisTemplateDetail", b => + { + b.Property("DiagnosisTemplateId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_template_id") + .IsFixedLength() + .HasComment("诊断模板编号"); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength() + .HasComment("诊断编号"); + + b.HasKey("DiagnosisTemplateId", "DiagnosisId") + .HasName("pk_diagnosis_template_detail"); + + b.HasIndex("DiagnosisId"); + + b.ToTable("diagnosis_template_detail"); + + b.HasComment("诊断模板包含明细"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength() + .HasComment("父编号"); + + b.Property("PathCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("path_code") + .HasComment("路径编码"); + + b.HasKey("Id"); + + b.ToTable("diagnosis_type"); + + b.HasComment("诊断类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.FollowUpMode", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("smallint") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("follow_up_mode"); + + b.HasComment("随访方式"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.FollowUpPlan", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Content") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("content") + .HasComment("随访内容"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CycleDays") + .HasColumnType("smallint") + .HasColumnName("cycle_days") + .HasComment("周期天数"); + + b.Property("DoctorUserId") + .HasColumnType("uuid") + .HasColumnName("doctor_user_id") + .HasComment("医生"); + + b.Property("FollowUpModeId") + .HasColumnType("uuid") + .HasColumnName("follow_up_mode_id") + .IsFixedLength() + .HasComment("随访方式"); + + b.Property("FollowUpTypeId") + .HasColumnType("uuid") + .HasColumnName("follow_up_type_id") + .IsFixedLength() + .HasComment("随访类别"); + + b.Property("IsLoop") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_loop") + .HasComment("是否循环"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PerfomFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("perfom_flag") + .HasComment("执行标志"); + + b.Property("PerfomTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("perfom_time") + .HasComment("执行时间"); + + b.Property("PerfomUserId") + .HasColumnType("uuid") + .HasColumnName("perfom_user_id") + .HasComment("执行者用户ID"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark") + .HasComment("备注"); + + b.HasKey("Id"); + + b.ToTable("follow_up_plan"); + + b.HasComment("随访计划"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.FollowUpType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("smallint") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("follow_up_type"); + + b.HasComment("随访类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ForSex", b => + { + b.Property("Id") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("id"); + + b.Property("DisplayName") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("SimpleCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("for_sex"); + + b.HasComment("适用性别设置,固定编码"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Grouping", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ModifiedDate") + .HasColumnType("date") + .HasColumnName("modified_date"); + + b.Property("Modifier") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("modifier"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_grouping") + .IsUnique(); + + b.ToTable("grouping"); + + b.HasComment("废弃"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.GuideType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("guide_type"); + + b.HasComment("指引类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.HealthCertificate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("登记流水号"); + + b.Property("CertificateDate") + .HasColumnType("date") + .HasColumnName("certificate_date") + .HasComment("发证日期"); + + b.Property("CertificateNo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("certificate_no") + .HasComment("证件编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ServiceOrg") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("service_org") + .HasComment("服务单位"); + + b.Property("ServiceTradesId") + .HasColumnType("smallint") + .HasColumnName("service_trades_id") + .HasComment("服务行业"); + + b.HasKey("Id"); + + b.ToTable("health_certificate"); + + b.HasComment("健康证办理"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ImportLisResult", b => + { + b.Property("LisRequestNo") + .HasColumnType("uuid") + .HasColumnName("lis_request_no") + .HasComment("条码号"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .HasComment("项目"); + + b.Property("CheckDoctorName") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("check_doctor_name") + .HasComment("检查医生"); + + b.Property("CheckTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("check_time") + .HasComment("检查日期"); + + b.Property("CriticalRangeValue") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("critical_range_value"); + + b.Property("ImportTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("import_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)") + .HasComment("导入日期"); + + b.Property("ItemName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("item_name"); + + b.Property("PatientRegisterNo") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("patient_register_no") + .HasComment("条码号"); + + b.Property("ReferenceRangeValue") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("reference_range_value") + .HasComment("参考范围"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("ReportPrompt") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("report_prompt") + .HasComment("报告单提示"); + + b.Property("Result") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("result") + .HasComment("结果"); + + b.Property("Unit") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("unit") + .HasComment("单位"); + + b.HasKey("LisRequestNo", "ItemId") + .HasName("pk_import_lis_result"); + + b.HasIndex(new[] { "PatientRegisterNo" }, "ix_import_lis_result"); + + b.ToTable("import_lis_result"); + + b.HasComment("检验结果中间表"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ImportPacsPicture", b => + { + b.Property("CheckRequestNo") + .HasColumnType("uuid") + .HasColumnName("check_request_no") + .HasComment("检查申请单号"); + + b.Property("PictureFilename") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("picture_filename") + .HasComment("检查部位"); + + b.Property("AsbitemNames") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("asbitem_names") + .HasComment("组合项目名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("诊断结论"); + + b.Property("ImportTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("import_time") + .HasComment("导入日期"); + + b.Property("IsPrint") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_print") + .HasComment("是否打印"); + + b.Property("PatientRegisterNo") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("patient_register_no"); + + b.HasKey("CheckRequestNo", "PictureFilename") + .HasName("pk_import_pacs_picture_1"); + + b.ToTable("import_pacs_picture"); + + b.HasComment("pacs图片中间表"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ImportPacsResult", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AsbitemNames") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("asbitem_names") + .HasComment("组合项目名称"); + + b.Property("CheckDoctorName") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("check_doctor_name") + .HasComment("检查医生"); + + b.Property("CheckItems") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("check_items") + .HasComment("检查部位"); + + b.Property("CheckTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("check_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)") + .HasComment("检查日期"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("character varying(1000)") + .HasColumnName("description") + .HasComment("检查所见"); + + b.Property("ImportTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("import_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)") + .HasComment("导入日期"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PatientRegisterNo") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("patient_register_no") + .HasComment("人员登记号"); + + b.Property("Suggestion") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("suggestion") + .HasComment("建议"); + + b.Property("Summary") + .HasMaxLength(1000) + .HasColumnType("character varying(1000)") + .HasColumnName("summary") + .HasComment("诊断结论"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "PatientRegisterNo" }, "ix_import_pacs_result"); + + b.ToTable("import_pacs_result"); + + b.HasComment("PACS结果中间表"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.InvoiceItemType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_invoice_item_type") + .IsUnique(); + + b.ToTable("invoice_item_type"); + + b.HasComment("发票项目类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.InvoiceOrg", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_invoice_org") + .IsUnique(); + + b.ToTable("invoice_org"); + + b.HasComment("发票单位设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Item", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CalculationFunction") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("calculation_function") + .HasComment("计算函数"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DefaultResult") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("default_result") + .HasComment("默认结果"); + + b.Property("DiagnosisFunction") + .HasMaxLength(2000) + .HasColumnType("character varying(2000)") + .HasColumnName("diagnosis_function") + .HasComment("诊断函数"); + + b.Property("DisplayName") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("EnglishShortName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("english_short_name") + .HasComment("英文缩写"); + + b.Property("InputCheck") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("input_check") + .HasComment("输入结果校验公式"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active") + .HasComment("启用"); + + b.Property("IsCalculationItem") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_calculation_item") + .HasComment("是计算项目"); + + b.Property("IsContinueProcess") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_continue_process") + .HasComment("是继续处理"); + + b.Property("IsDiagnosisFunction") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_diagnosis_function") + .HasComment("启用诊断函数"); + + b.Property("IsNameIntoSummary") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_name_into_summary") + .HasComment("名称进入小结"); + + b.Property("IsProduceSummary") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_produce_summary") + .HasComment("是生成小结"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength() + .HasComment("项目类别"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price") + .HasComment("价格"); + + b.Property("PriceItemId") + .HasMaxLength(8) + .HasColumnType("uuid") + .HasColumnName("price_item_id") + .IsFixedLength() + .HasComment("价表项目编码"); + + b.Property("ReferenceRangeTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("reference_range_type_flag") + .HasDefaultValueSql("'E'::bpchar") + .HasComment("参考范围类别0-无参考范围,1-数字型,2-字符型,3-性激素"); + + b.Property("ResultTemplateTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("result_template_type_flag") + .HasDefaultValueSql("0") + .HasComment("结果模板类别标志"); + + b.Property("SimpleCode") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("simple_code"); + + b.Property("UnitId") + .HasColumnType("uuid") + .HasColumnName("unit_id") + .IsFixedLength() + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("ItemTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_item") + .IsUnique(); + + b.ToTable("item"); + + b.HasComment("项目设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemDefaultResult", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_item_default_result") + .IsUnique(); + + b.ToTable("item_default_result"); + + b.HasComment("项目默认结果设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultMatch", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("结果匹配编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength() + .HasComment("诊断编号"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1") + .HasComment("显示顺序"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Result") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("result") + .HasComment("结果"); + + b.HasKey("Id"); + + b.HasIndex("DiagnosisId"); + + b.HasIndex("ItemId"); + + b.ToTable("item_result_match"); + + b.HasComment("结果匹配设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("结果模板编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength() + .HasComment("诊断编号"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("IsNameIntoSummary") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_name_into_summary") + .HasComment("小结前是否加名称"); + + b.Property("IsResultIntoSummary") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_result_into_summary"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Result") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("result") + .HasComment("结果"); + + b.Property("ResultStatusId") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("result_status_id") + .HasComment("结果状态"); + + b.Property("SimpleCode") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("simple_code") + .HasComment("拼音简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "ItemId", "Result" }, "ix_item_result_template") + .IsUnique(); + + b.ToTable("item_result_template"); + + b.HasComment("项目结果模板设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultTemplateType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "ItemId", "DisplayName" }, "ix_item_result_template_type") + .IsUnique(); + + b.ToTable("item_result_template_type"); + + b.HasComment("项目结果模板类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_item_template") + .IsUnique(); + + b.ToTable("item_template"); + + b.HasComment("项目模板设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemTemplateDetail", b => + { + b.Property("ItemTemplateId") + .HasColumnType("uuid") + .HasColumnName("item_template_id") + .IsFixedLength(); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编号"); + + b.HasKey("ItemTemplateId", "ItemId") + .HasName("pk_item_template_detail"); + + b.HasIndex("ItemId"); + + b.ToTable("item_template_detail"); + + b.HasComment("项目模板明细"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CheckTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("check_type_flag") + .HasDefaultValueSql("'G'::bpchar") + .HasComment("检查类别,0-普通检查,1-检验,2-影像检查"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("GuidTypeId") + .HasColumnType("uuid") + .HasColumnName("guid_type_id") + .IsFixedLength() + .HasComment("指引类别"); + + b.Property("IsMergeAsbitem") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_merge_asbitem") + .HasComment("合并组合项目,Y-是,N-否"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MedicalReportTypeId") + .HasColumnType("uuid") + .HasColumnName("medical_report_type_id") + .IsFixedLength() + .HasComment("体检报告类别"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength() + .HasComment("父id"); + + b.Property("PathCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("path_code") + .HasComment("路径编码"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex("GuidTypeId"); + + b.HasIndex("MedicalReportTypeId"); + + b.HasIndex(new[] { "DisplayName", "ParentId" }, "ix_item_type") + .IsUnique(); + + b.ToTable("item_type"); + + b.HasComment("项目类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.LisRequest", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("IsPrint") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_print") + .HasComment("是否已打印"); + + b.Property("IsSignIn") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_sign_in") + .HasComment("是签收"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LisRequestNo") + .HasColumnType("uuid") + .HasColumnName("lis_request_no") + .HasComment("检验申请单号"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("病人登记ID"); + + b.Property("SampleContainerId") + .HasColumnType("uuid") + .HasColumnName("sample_container_id") + .IsFixedLength() + .HasComment("标本容器编号"); + + b.Property("SampleTypeId") + .HasColumnType("uuid") + .HasColumnName("sample_type_id") + .IsFixedLength() + .HasComment("标本类型"); + + b.Property("Sampler") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("sampler") + .HasComment("采样人姓名"); + + b.Property("SamplingTime") + .HasColumnType("date") + .HasColumnName("sampling_time") + .HasComment("采样时间"); + + b.Property("SignInOrder") + .HasColumnType("integer") + .HasColumnName("sign_in_order") + .HasComment("签收顺序"); + + b.Property("SignInPerson") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("sign_in_person") + .HasComment("签收人姓名"); + + b.Property("SignInTime") + .HasColumnType("date") + .HasColumnName("sign_in_time") + .HasComment("签收时间"); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.HasIndex("SampleContainerId"); + + b.HasIndex("SampleTypeId"); + + b.HasIndex(new[] { "LisRequestNo" }, "ix_lis_request") + .IsUnique(); + + b.ToTable("lis_request"); + + b.HasComment("检验申请单"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MaritalStatus", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("id") + .HasDefaultValueSql("'0'::bpchar") + .HasComment("婚姻状况编号"); + + b.Property("DisplayName") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("display_name") + .HasComment("婚姻状况名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("SimpleCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_marital_status") + .IsUnique(); + + b.ToTable("marital_status"); + + b.HasComment("婚姻状况设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalConclusion", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("体检结论编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("体检结论名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MedicalConclusionTypeId") + .HasMaxLength(2) + .HasColumnType("character(2)") + .HasColumnName("medical_conclusion_type_id") + .IsFixedLength(); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex("MedicalConclusionTypeId"); + + b.ToTable("medical_conclusion"); + + b.HasComment("体检结论设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalConclusionType", b => + { + b.Property("Id") + .HasMaxLength(2) + .HasColumnType("character(2)") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_medical_conclusion_type") + .IsUnique(); + + b.ToTable("medical_conclusion_type"); + + b.HasComment("体检结论类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalPackage", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("套餐主档编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1") + .HasComment("显示顺序"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar") + .HasComment("适用性别"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active") + .HasComment("启用标志"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price") + .HasComment("价格"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_medical_package") + .IsUnique(); + + b.ToTable("medical_package"); + + b.HasComment("体检套餐主档设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalPackageDetail", b => + { + b.Property("MedicalPackageId") + .HasColumnType("uuid") + .HasColumnName("medical_package_id") + .IsFixedLength(); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength() + .HasComment("组合项目编号"); + + b.HasKey("MedicalPackageId", "AsbitemId") + .HasName("pk_medical_package_detail"); + + b.HasIndex("AsbitemId"); + + b.ToTable("medical_package_detail"); + + b.HasComment("体检套餐包含的组合项目设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalReportType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("medical_report_type"); + + b.HasComment("体检报告类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("体检类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("体检类别名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_medical_type") + .IsUnique(); + + b.ToTable("medical_type"); + + b.HasComment("体检类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Nation", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("CountryCode") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("country_code"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("拼音简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_nation") + .IsUnique(); + + b.ToTable("nation"); + + b.HasComment("民族设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.OcCheckType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("职业病检查类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OcCheckTypeName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("oc_check_type_name") + .HasComment("职业病检查类别名称"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("oc_check_type"); + + b.HasComment("职业病检查类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.OperateLog", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ComputerName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("computer_name"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OperateContent") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("operate_content"); + + b.Property("OperateTime") + .HasColumnType("date") + .HasColumnName("operate_time"); + + b.Property("OperateType") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("operate_type"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark"); + + b.Property("Sqlsyntax") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("sqlsyntax"); + + b.Property("TableName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("table_name"); + + b.Property("UserId") + .HasMaxLength(16) + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("WindowName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("window_name"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "ComputerName" }, "ix_operate_log"); + + b.HasIndex(new[] { "WindowName" }, "ix_operate_log_1"); + + b.ToTable("operate_log"); + + b.HasComment("作日志,已经废弃"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.OrganizationUnitsCustomerOrg", b => + { + b.Property("CustomerOrgId") + .HasColumnType("uuid") + .HasColumnName("customer_org_id") + .IsFixedLength() + .HasComment("客户单位编号"); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id") + .IsFixedLength() + .HasComment("体检中心编号"); + + b.HasKey("CustomerOrgId", "OrganizationUnitId") + .HasName("pk_medical_center_org"); + + b.HasIndex("OrganizationUnitId"); + + b.ToTable("organization_units_customer_org"); + + b.HasComment("体检中心单位权限"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Patient", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Address") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("address") + .HasComment("地址"); + + b.Property("BirthDate") + .HasColumnType("date") + .HasColumnName("birth_date") + .HasComment("出生日期"); + + b.Property("BirthPlaceId") + .HasColumnType("uuid") + .HasColumnName("birth_place_id") + .IsFixedLength() + .HasComment("出生地"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("display_name") + .HasComment("姓名"); + + b.Property("Email") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("email") + .HasComment("email"); + + b.Property("IdNo") + .HasMaxLength(18) + .HasColumnType("character varying(18)") + .HasColumnName("id_no") + .HasComment("身份证号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MaritalStatusId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("marital_status_id") + .HasComment("婚姻状况"); + + b.Property("MobileTelephone") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("mobile_telephone") + .HasComment("手机号"); + + b.Property("NationId") + .HasColumnType("uuid") + .HasColumnName("nation_id") + .IsFixedLength() + .HasComment("民族编号"); + + b.Property("PatientPassword") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("patient_password") + .HasComment("登录密码"); + + b.Property("PostalCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("postal_code") + .HasComment("邮政编码"); + + b.Property("SexId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("sex_id") + .HasComment("性别"); + + b.Property("Telephone") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("telephone") + .HasComment("电话"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "IdNo" }, "ix_patient"); + + b.HasIndex(new[] { "DisplayName" }, "ix_patient_1"); + + b.ToTable("patient"); + + b.HasComment("体检人员档案"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientOccupationalDisease", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AbnormalTimes") + .HasColumnType("integer") + .HasColumnName("abnormal_times"); + + b.Property("AbortionTimes") + .HasColumnType("integer") + .HasColumnName("abortion_times"); + + b.Property("ChildrenNum") + .HasColumnType("integer") + .HasColumnName("children_num"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DiagnosisDate") + .HasColumnType("date") + .HasColumnName("diagnosis_date"); + + b.Property("DiagnosisHospital") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("diagnosis_hospital"); + + b.Property("DrinkFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("drink_flag"); + + b.Property("DrinkNum") + .HasColumnType("integer") + .HasColumnName("drink_num"); + + b.Property("DrinkYears") + .HasColumnType("integer") + .HasColumnName("drink_years"); + + b.Property("FirstMenstruation") + .HasColumnType("integer") + .HasColumnName("first_menstruation"); + + b.Property("HandleSuggestion") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("handle_suggestion"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MenstrualHistory") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("menstrual_history"); + + b.Property("MenstruationCycle") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("menstruation_cycle"); + + b.Property("MenstruationEndAge") + .HasColumnType("integer") + .HasColumnName("menstruation_end_age"); + + b.Property("MenstruationFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("menstruation_flag"); + + b.Property("MenstruationTimeLength") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("menstruation_time_length"); + + b.Property("NoOccupAbSuggestion") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("no_occup_ab_suggestion"); + + b.Property("NoOccupationalAbnormal") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("no_occupational_abnormal"); + + b.Property("OcCheckTypeId") + .HasColumnType("uuid") + .HasColumnName("oc_check_type_id") + .IsFixedLength(); + + b.Property("OccupationalAbSuggestion") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("occupational_ab_suggestion"); + + b.Property("OccupationalAbnormal") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("occupational_abnormal"); + + b.Property("OccupationalDisease") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("occupational_disease"); + + b.Property("Other") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("other"); + + b.Property("PoisonWorkTime") + .HasMaxLength(6) + .HasColumnType("character varying(6)") + .HasColumnName("poison_work_time"); + + b.Property("PrematureBirthTimes") + .HasColumnType("integer") + .HasColumnName("premature_birth_times"); + + b.Property("PreviousHistory") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("previous_history"); + + b.Property("Recovery") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("recovery"); + + b.Property("SmokeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("smoke_flag"); + + b.Property("SmokeNum") + .HasColumnType("integer") + .HasColumnName("smoke_num"); + + b.Property("SmokeYears") + .HasColumnType("integer") + .HasColumnName("smoke_years"); + + b.Property("StillbirthTimes") + .HasColumnType("integer") + .HasColumnName("stillbirth_times"); + + b.Property("TotalWorkTime") + .HasMaxLength(6) + .HasColumnType("character varying(6)") + .HasColumnName("total_work_time"); + + b.HasKey("Id"); + + b.ToTable("patient_occupational_disease"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientOccupationalHistory", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("BeginDate") + .HasColumnType("date") + .HasColumnName("begin_date"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("EndDate") + .HasColumnType("date") + .HasColumnName("end_date"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Org") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("org"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("Poison") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("poison"); + + b.Property("ProtectiveMeasures") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("protective_measures"); + + b.Property("WorkShop") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("work_shop"); + + b.Property("WorkType") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("work_type"); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.ToTable("patient_occupational_history"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientPoison", b => + { + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("PoisonId") + .HasColumnType("uuid") + .HasColumnName("poison_id") + .IsFixedLength(); + + b.HasKey("PatientRegisterId", "PoisonId") + .HasName("pk_patient_poison"); + + b.HasIndex("PoisonId"); + + b.ToTable("patient_poison"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientRegister", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("登记流水号"); + + b.Property("Age") + .HasColumnType("smallint") + .HasColumnName("age") + .HasComment("年龄"); + + b.Property("AuditDate") + .HasColumnType("date") + .HasColumnName("audit_date"); + + b.Property("AuditDoctor") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("audit_doctor"); + + b.Property("BirthDate") + .HasColumnType("date") + .HasColumnName("birth_date"); + + b.Property("CompleteFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("complete_flag") + .HasDefaultValueSql("'0'::bpchar") + .HasComment("完成标志"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgGroupId") + .HasColumnType("uuid") + .HasColumnName("customer_org_group_id") + .IsFixedLength() + .HasComment("分组"); + + b.Property("CustomerOrgId") + .HasColumnType("uuid") + .HasColumnName("customer_org_id") + .IsFixedLength() + .HasComment("单位编号"); + + b.Property("CustomerOrgRegisterId") + .HasColumnType("uuid") + .HasColumnName("customer_org_register_id"); + + b.Property("GuidePrintTimes") + .HasColumnType("smallint") + .HasColumnName("guide_print_times"); + + b.Property("InterposeMeasure") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("interpose_measure") + .HasComment("干预措施"); + + b.Property("IsAudit") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_audit"); + + b.Property("IsLock") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_lock"); + + b.Property("IsMedicalStart") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_medical_start") + .HasComment("体检开始标志"); + + b.Property("IsNameHide") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_name_hide"); + + b.Property("IsPhoneFollow") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_phone_follow"); + + b.Property("IsRecoverGuide") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_recover_guide"); + + b.Property("IsUpload") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_upload"); + + b.Property("IsVip") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_vip"); + + b.Property("JobCardNo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("job_card_no") + .HasComment("工卡号"); + + b.Property("JobPost") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("job_post") + .HasComment("职务"); + + b.Property("JobTitle") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("job_title") + .HasComment("职称"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MaritalStatusId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("marital_status_id") + .HasDefaultValueSql("'0'::bpchar") + .HasComment("婚姻状况"); + + b.Property("MedicalCardNo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("medical_card_no"); + + b.Property("MedicalConclusionId") + .HasColumnType("uuid") + .HasColumnName("medical_conclusion_id") + .IsFixedLength() + .HasComment("体检结论"); + + b.Property("MedicalPackageId") + .HasColumnType("uuid") + .HasColumnName("medical_package_id") + .IsFixedLength() + .HasComment("套餐"); + + b.Property("MedicalStartDate") + .ValueGeneratedOnAdd() + .HasColumnType("date") + .HasColumnName("medical_start_date") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)") + .HasComment("体检开始日期"); + + b.Property("MedicalTimes") + .HasColumnType("smallint") + .HasColumnName("medical_times") + .HasComment("体检次数"); + + b.Property("MedicalTypeId") + .HasColumnType("uuid") + .HasColumnName("medical_type_id") + .IsFixedLength() + .HasComment("体检类别"); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id"); + + b.Property("PatientId") + .HasColumnType("uuid") + .HasColumnName("patient_id") + .HasComment("档案号"); + + b.Property("PatientName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("patient_name") + .HasComment("姓名"); + + b.Property("PatientRegisterNo") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("patient_register_no") + .HasComment("条码号"); + + b.Property("PersonnelTypeId") + .HasColumnType("uuid") + .HasColumnName("personnel_type_id") + .IsFixedLength() + .HasComment("人员类别"); + + b.Property("Photo") + .HasColumnType("bytea") + .HasColumnName("photo") + .HasComment("照片"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark"); + + b.Property("ReportPrintTimes") + .HasColumnType("smallint") + .HasColumnName("report_print_times") + .HasComment("体检报告打印次数"); + + b.Property("Salesman") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("salesman") + .HasComment("介绍人"); + + b.Property("SexHormoneTermId") + .HasColumnType("uuid") + .HasColumnName("sex_hormone_term_id") + .IsFixedLength(); + + b.Property("SexId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("sex_id") + .HasComment("性别"); + + b.Property("SummaryDate") + .HasColumnType("date") + .HasColumnName("summary_date") + .HasComment("总检日期"); + + b.Property("SummaryDoctor") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("summary_doctor") + .HasComment("总检医生"); + + b.Property("ThirdInfo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("third_info"); + + b.HasKey("Id"); + + b.HasIndex("MaritalStatusId"); + + b.HasIndex(new[] { "CustomerOrgRegisterId" }, "fki_fk_patient_register_org_register"); + + b.HasIndex(new[] { "OrganizationUnitId" }, "fki_fk_patient_register_ororganization_unit"); + + b.HasIndex(new[] { "PatientRegisterNo" }, "ix_patient_register") + .IsUnique(); + + b.HasIndex(new[] { "PatientId", "MedicalTimes" }, "ix_patient_register_1") + .IsUnique(); + + b.HasIndex(new[] { "PatientName" }, "ix_patient_register_2"); + + b.ToTable("patient_register"); + + b.HasComment("体检登记主档"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientSymptom", b => + { + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("SymptomId") + .HasColumnType("uuid") + .HasColumnName("symptom_id") + .IsFixedLength(); + + b.Property("Degree") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("degree"); + + b.Property("TimeLength") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("time_length"); + + b.HasKey("PatientRegisterId", "SymptomId") + .HasName("pk_patient_symptom"); + + b.HasIndex("SymptomId"); + + b.ToTable("patient_symptom"); + + b.HasComment("职业病-体检病人症状"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PayMode", b => + { + b.Property("Id") + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("id") + .IsFixedLength() + .HasComment("编号,固定编码"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_payment_mode") + .IsUnique(); + + b.ToTable("pay_mode"); + + b.HasComment("支付方式设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PersonnelType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("人员类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("人员类别名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_personnel_type") + .IsUnique(); + + b.ToTable("personnel_type"); + + b.HasComment("人员类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PhoneFollow", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("FollowContent") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("follow_content") + .HasComment("随访内容"); + + b.Property("FollowUpPlanId") + .HasColumnType("uuid") + .HasColumnName("follow_up_plan_id") + .HasComment("随访计划ID"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("病人登记ID"); + + b.Property("ReplyContent") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("reply_content") + .HasComment("回复内容"); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.ToTable("phone_follow"); + + b.HasComment("电话随访"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Poison", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("毒害编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("毒害名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PoisonTypeId") + .HasColumnType("uuid") + .HasColumnName("poison_type_id") + .IsFixedLength(); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("PoisonTypeId"); + + b.ToTable("poison"); + + b.HasComment("毒害因素设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PoisonType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("毒害类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("毒害类别名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("poison_type"); + + b.HasComment("毒害因素类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PositionType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("职务编号"); + + b.Property("CreationTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("职务名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime") + .HasComment("最后修改日期"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId") + .HasComment("最后修改者"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_position_type") + .IsUnique(); + + b.ToTable("position_type"); + + b.HasComment("职务类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PriceItem", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("InvoiceItemTypeId") + .HasColumnType("uuid") + .HasColumnName("invoice_item_type_id") + .IsFixedLength() + .HasComment("发票项目类别ID"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price") + .HasComment("价格"); + + b.Property("PriceItemCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("price_item_code") + .HasComment("价表编码"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("InvoiceItemTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_price_item") + .IsUnique(); + + b.ToTable("price_item"); + + b.HasComment("价表项目设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PrimarykeyBuilder", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("主键编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DateString") + .HasMaxLength(8) + .HasColumnType("character(8)") + .HasColumnName("date_string") + .IsFixedLength() + .HasComment("日期"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SerialNo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("serial_no") + .HasComment("序列号"); + + b.HasKey("Id"); + + b.ToTable("primarykey_builder"); + + b.HasComment("主键产生器,废弃"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.QueueRegister", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CallTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("call_time") + .HasComment("叫号时间"); + + b.Property("CompleteFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("complete_flag") + .HasDefaultValueSql("0") + .HasComment("完成标志"); + + b.Property("CreationTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("排队顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("NoCompleteReason") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("no_complete_reason") + .HasDefaultValueSql("0") + .HasComment("未完成原因"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("病人登记ID"); + + b.Property("RoomId") + .HasColumnType("uuid") + .HasColumnName("room_id") + .IsFixedLength() + .HasComment("房间ID"); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.ToTable("queue_register"); + + b.HasComment("排队登记"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ReferenceRange", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("参考范围编号"); + + b.Property("AgeLowerLimit") + .HasColumnType("smallint") + .HasColumnName("age_lower_limit") + .HasComment("年龄下限"); + + b.Property("AgeUpperLimit") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasColumnName("age_upper_limit") + .HasDefaultValueSql("200") + .HasComment("年龄上限"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CriticalRangeValue") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("critical_range_value") + .HasComment("危急值"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar") + .HasComment("性别"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LowerDiagnosisId") + .HasColumnType("uuid") + .HasColumnName("lower_diagnosis_id") + .IsFixedLength() + .HasComment("偏低诊断"); + + b.Property("ReferenceRangeTypeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("reference_range_type_flag") + .HasComment("参考范围类别0-无参考范围,1-数字型,2-字符型,3-性激素"); + + b.Property("ReferenceRangeValue") + .HasMaxLength(150) + .HasColumnType("character varying(150)") + .HasColumnName("reference_range_value") + .HasComment("参考范围值数字型保存区间字符型保存文本值"); + + b.Property("UpperDiagnosisId") + .HasColumnType("uuid") + .HasColumnName("upper_diagnosis_id") + .IsFixedLength() + .HasComment("偏高诊断"); + + b.HasKey("Id"); + + b.HasIndex("ItemId"); + + b.ToTable("reference_range"); + + b.HasComment("项目参考范围设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterAsbitem", b => + { + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id") + .HasComment("检查单ID"); + + b.Property("AsbitemId") + .HasMaxLength(6) + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength() + .HasComment("组合项目"); + + b.Property("Amount") + .HasColumnType("smallint") + .HasColumnName("amount") + .HasComment("数量"); + + b.Property("ChargePrice") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_price") + .HasComment("实收价格"); + + b.Property("IsCharge") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_charge") + .HasComment("是否已收费"); + + b.Property("LisRequestId") + .HasMaxLength(20) + .HasColumnType("uuid") + .HasColumnName("lis_request_id") + .HasComment("LIS申请ID"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("登记流水号"); + + b.Property("PayTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("pay_type_flag") + .HasDefaultValueSql("0") + .HasComment("支付方式,比如是自费、免费、单位支付"); + + b.Property("RegisterAsbitemId") + .HasColumnType("uuid") + .HasColumnName("register_asbitem_id") + .HasComment("主键"); + + b.Property("StandardPrice") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("standard_price") + .HasComment("标准价格"); + + b.HasKey("RegisterCheckId", "AsbitemId") + .HasName("pk_register_asbitem"); + + b.HasIndex("AsbitemId"); + + b.HasIndex(new[] { "PatientRegisterId", "AsbitemId" }, "ix_register_asbitem") + .IsUnique(); + + b.ToTable("register_asbitem"); + + b.HasComment("检查组合项目记录"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheck", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AuditTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("audit_time") + .HasComment("审核时间"); + + b.Property("AuditorUserId") + .HasColumnType("uuid") + .HasColumnName("auditor_user_id") + .HasComment("审核医生ID"); + + b.Property("CheckDate") + .HasColumnType("date") + .HasColumnName("check_date") + .HasComment("检查日期"); + + b.Property("CheckDoctorId") + .HasColumnType("uuid") + .HasColumnName("check_doctor_id") + .HasComment("检查医生ID"); + + b.Property("CheckRequestNo") + .HasMaxLength(20) + .HasColumnType("uuid") + .HasColumnName("check_request_no") + .HasComment("检查单号"); + + b.Property("CheckRequestPrintTimes") + .HasColumnType("smallint") + .HasColumnName("check_request_print_times") + .HasComment("检查申请单打印次数"); + + b.Property("CompleteFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("complete_flag") + .HasDefaultValueSql("0") + .HasComment("完成标志"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CriticalValue") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("critical_value") + .HasComment("危急值"); + + b.Property("CriticalValueCreateDate") + .HasColumnType("date") + .HasColumnName("critical_value_create_date") + .HasComment("危急值创建日期"); + + b.Property("CriticalValueFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("critical_value_flag") + .HasDefaultValueSql("0") + .HasComment("危急值标志"); + + b.Property("CriticalValueProcessContent") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("critical_value_process_content") + .HasComment("危急值处理内容"); + + b.Property("CriticalValueProcessDate") + .HasColumnType("date") + .HasColumnName("critical_value_process_date") + .HasComment("危急值处理日期"); + + b.Property("CriticalValueProcessDoctor") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("critical_value_process_doctor") + .HasComment("危急值处理医生"); + + b.Property("CriticalValueProcessFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("critical_value_process_flag") + .HasComment("危急值处理标志"); + + b.Property("IsAudit") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_audit") + .HasComment("是审核"); + + b.Property("IsLock") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_lock") + .HasComment("是否锁住"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ThirdInfo") + .HasMaxLength(80) + .HasColumnType("character varying(80)") + .HasColumnName("third_info") + .HasComment("第三方信息"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "CheckRequestNo" }, "ix_register_check_1"); + + b.ToTable("register_check"); + + b.HasComment("登记检查单"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckCriticalValue", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CriticalValue") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("critical_value") + .HasComment("危急值"); + + b.Property("Doctor") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("doctor") + .HasComment("处理医生"); + + b.Property("IsComplete") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_complete") + .HasComment("是否完成"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ProcessTypeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("process_type_flag") + .HasComment("处理类别标志"); + + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id") + .HasComment("登记检查ID"); + + b.HasKey("Id"); + + b.ToTable("register_check_critical_value"); + + b.HasComment("检查危急值"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckItem", b => + { + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编号"); + + b.Property("CheckDate") + .HasColumnType("date") + .HasColumnName("check_date") + .HasComment("检查日期"); + + b.Property("CheckDoctorName") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("check_doctor_name") + .HasComment("检查医生"); + + b.Property("CriticalRangeValue") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("critical_range_value") + .HasComment("危急值范围"); + + b.Property("CriticalValue") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("critical_value") + .HasComment("危急值"); + + b.Property("ReferenceRangeValue") + .ValueGeneratedOnAdd() + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("reference_range_value") + .HasDefaultValueSql("''::character varying") + .HasComment("参考范围"); + + b.Property("Result") + .HasMaxLength(1000) + .HasColumnType("character varying(1000)") + .HasColumnName("result") + .HasComment("结果"); + + b.Property("ResultStatusId") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("result_status_id") + .HasComment("报告单提示"); + + b.Property("Unit") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("unit") + .HasComment("单位"); + + b.HasKey("RegisterCheckId", "ItemId") + .HasName("pk_register_item_1"); + + b.HasIndex("ItemId"); + + b.HasIndex("ResultStatusId"); + + b.ToTable("register_check_item"); + + b.HasComment("检查明细项目记录"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckPicture", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("检查图片编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1") + .HasComment("显示顺序"); + + b.Property("IsPrint") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_print") + .HasComment("打印标志"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PictureFilename") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("picture_filename") + .HasComment("图片名"); + + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id") + .HasComment("登记流水号"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "RegisterCheckId", "PictureFilename" }, "ix_check_picture") + .IsUnique(); + + b.ToTable("register_check_picture"); + + b.HasComment("体检登记组合项目图片"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckSuggestion", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id") + .HasComment("登记检查ID"); + + b.Property("Suggestion") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("suggestion") + .HasComment("建议"); + + b.HasKey("Id"); + + b.HasIndex("RegisterCheckId"); + + b.ToTable("register_check_suggestion"); + + b.HasComment("登记检查建议"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckSummary", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id") + .HasComment("登记检查ID"); + + b.Property("Summary") + .HasMaxLength(500) + .HasColumnType("character varying(500)") + .HasColumnName("summary") + .HasComment("综述"); + + b.Property("SummaryFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("summary_flag") + .HasComment("综述标志"); + + b.HasKey("Id"); + + b.HasIndex("RegisterCheckId"); + + b.ToTable("register_check_summary"); + + b.HasComment("登记检查综述"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ResultStatus", b => + { + b.Property("Id") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("id"); + + b.Property("DataInputBackgroundColor") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("data_input_background_color") + .HasDefaultValueSql("16777215") + .HasComment("数据录入报告单颜色"); + + b.Property("DataInputFontColor") + .HasColumnType("integer") + .HasColumnName("data_input_font_color") + .HasComment("数据录入字体颜色"); + + b.Property("DataInputPrompt") + .HasMaxLength(8) + .HasColumnType("character varying(8)") + .HasColumnName("data_input_prompt") + .HasComment("数据录入提示"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("ReportBackgroundColor") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("report_background_color") + .HasDefaultValueSql("16777215") + .HasComment("报告单背景颜色"); + + b.Property("ReportFontColor") + .HasColumnType("integer") + .HasColumnName("report_font_color") + .HasComment("报告单字体颜色"); + + b.Property("ReportPrompt") + .HasMaxLength(8) + .HasColumnType("character varying(8)") + .HasColumnName("report_prompt") + .HasComment("报告单提示"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_result_status") + .IsUnique(); + + b.ToTable("result_status"); + + b.HasComment("结果状态设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Room", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DepartmentId") + .HasColumnType("uuid") + .HasColumnName("department_id") + .IsFixedLength() + .HasComment(""); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength() + .HasComment("项目类别编号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("RoomTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("room_type_flag") + .HasDefaultValueSql("0"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("DepartmentId"); + + b.HasIndex("ItemTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_room") + .IsUnique(); + + b.ToTable("room"); + + b.HasComment("房间设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleContainer", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("ContainerColor") + .HasColumnType("integer") + .HasColumnName("container_color") + .HasComment("颜色"); + + b.Property("ContainerColorName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("container_color_name") + .HasComment("颜色名"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_sample_container") + .IsUnique(); + + b.ToTable("sample_container"); + + b.HasComment("标本容器设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleGroup", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SampleContainerId") + .HasColumnType("uuid") + .HasColumnName("sample_container_id") + .IsFixedLength() + .HasComment("标本容器ID"); + + b.Property("SampleTypeId") + .HasColumnType("uuid") + .HasColumnName("sample_type_id") + .IsFixedLength() + .HasComment("标本类型ID"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("SampleContainerId"); + + b.HasIndex("SampleTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_sample_group") + .IsUnique(); + + b.ToTable("sample_group"); + + b.HasComment("标本分组设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleGroupDetail", b => + { + b.Property("SampleGroupId") + .HasColumnType("uuid") + .HasColumnName("sample_group_id") + .IsFixedLength(); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength() + .HasComment("组合项目编号"); + + b.HasKey("SampleGroupId", "AsbitemId") + .HasName("pk_sample_group_detail"); + + b.HasIndex(new[] { "AsbitemId" }, "ix_sample_group_detail") + .IsUnique(); + + b.ToTable("sample_group_detail"); + + b.HasComment("标本分组包含组合项目设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_sample_type"); + + b.ToTable("sample_type"); + + b.HasComment("标本类型设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ServiceTrade", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DepartmentId") + .HasColumnType("uuid") + .HasColumnName("department_id") + .IsFixedLength(); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("ValidPeriod") + .HasColumnType("smallint") + .HasColumnName("valid_period") + .HasComment("有效期"); + + b.Property("ValidPeriodDisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("valid_period_display_name") + .HasComment("有效期名"); + + b.Property("ValidPeriodUnit") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("valid_period_unit") + .HasComment("有效期单位"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DepartmentId", "DisplayName" }, "ix_service_trades") + .IsUnique(); + + b.ToTable("service_trades"); + + b.HasComment("服务行业设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SettleAccount", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CompletedBy") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("completed_by") + .HasComment("结账人"); + + b.Property("CompletedTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("completed_time") + .HasComment("结账时间"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("IsComplete") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_complete") + .HasComment("是完成"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.ToTable("settle_account"); + + b.HasComment("结账"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Sex", b => + { + b.Property("Id") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("id"); + + b.Property("DisplayName") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("SimpleCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("sex"); + + b.HasComment("性别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SexHormoneReferenceRange", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("AgeLowerLimit") + .HasColumnType("smallint") + .HasColumnName("age_lower_limit") + .HasComment("年龄下限"); + + b.Property("AgeUpperLimit") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasColumnName("age_upper_limit") + .HasDefaultValueSql("200") + .HasComment("年龄上限"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CriticalRangeValue") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("critical_range_value") + .HasComment("危急值参考范围"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LowerDiagnosisId") + .HasColumnType("uuid") + .HasColumnName("lower_diagnosis_id") + .IsFixedLength() + .HasComment("下限诊断"); + + b.Property("ReferenceRangeValue") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("reference_range_value") + .HasComment("参考范围"); + + b.Property("SexHormoneTermId") + .HasColumnType("uuid") + .HasColumnName("sex_hormone_term_id") + .IsFixedLength() + .HasComment("性激素期限ID"); + + b.Property("UpperDiagnosisId") + .HasColumnType("uuid") + .HasColumnName("upper_diagnosis_id") + .IsFixedLength() + .HasComment("上限诊断"); + + b.HasKey("Id"); + + b.HasIndex("ItemId"); + + b.HasIndex("SexHormoneTermId"); + + b.ToTable("sex_hormone_reference_range"); + + b.HasComment("性激素参考范围设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SexHormoneTerm", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_sex_hormone_term") + .IsUnique(); + + b.ToTable("sex_hormone_term"); + + b.HasComment("性激素期限设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SmsSend", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Content") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("content") + .HasComment("短信内容"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("FollowUpPlanId") + .HasColumnType("uuid") + .HasColumnName("follow_up_plan_id") + .HasComment("随访计划ID"); + + b.Property("IsComplete") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_complete") + .HasComment("是完成"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MobileTelephone") + .HasMaxLength(11) + .HasColumnType("character varying(11)") + .HasColumnName("mobile_telephone") + .HasComment("手机号"); + + b.Property("PatientId") + .HasColumnType("uuid") + .HasColumnName("patient_id") + .HasComment("人员ID"); + + b.Property("PatientName") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("patient_name") + .HasComment("姓名"); + + b.Property("SmsTypeId") + .HasColumnType("uuid") + .HasColumnName("sms_type_id") + .IsFixedLength() + .HasComment("短信类别ID"); + + b.HasKey("Id"); + + b.ToTable("sms_send"); + + b.HasComment("短信发送"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SmsTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("Content") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("content") + .HasComment("短信内容"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("smallint") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("SmsTypeId") + .HasColumnType("uuid") + .HasColumnName("sms_type_id") + .IsFixedLength() + .HasComment("短信类别ID"); + + b.HasKey("Id"); + + b.ToTable("sms_template"); + + b.HasComment("短信模板"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SmsType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("smallint") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("sms_type"); + + b.HasComment("短信类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Suggestion", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength() + .HasComment("诊断ID"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SuggestionContent") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("suggestion_content") + .HasComment("建议内容"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DiagnosisId", "SuggestionContent" }, "ix_suggestion") + .IsUnique(); + + b.ToTable("suggestion"); + + b.HasComment("建议设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumDiagnosis", b => + { + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("病人登记ID"); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength() + .HasComment("诊断ID"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("SumSuggestionHeaderId") + .HasColumnType("uuid") + .HasColumnName("sum_suggestion_header_id") + .HasComment("建议头ID"); + + b.HasKey("PatientRegisterId", "DiagnosisId") + .HasName("pk_summary_diagnosis"); + + b.HasIndex("DiagnosisId"); + + b.ToTable("sum_diagnosis"); + + b.HasComment("总检诊断"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SummaryTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("TemplateContent") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("template_content") + .HasComment("模板内容"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_summary_template") + .IsUnique(); + + b.ToTable("summary_template"); + + b.HasComment("综述模板设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSuggestionContent", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SuggestionContent") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("suggestion_content"); + + b.Property("SumSuggestionHeaderId") + .HasColumnType("uuid") + .HasColumnName("sum_suggestion_header_id"); + + b.HasKey("Id"); + + b.HasIndex("SumSuggestionHeaderId"); + + b.ToTable("sum_suggestion_content"); + + b.HasComment("总检建议内容"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSuggestionHeader", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("病人登记ID"); + + b.Property("SuggestionFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("suggestion_flag") + .HasComment("建议标志"); + + b.Property("SuggestionTitle") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("suggestion_title") + .HasComment("建议标题"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "PatientRegisterId", "SuggestionTitle" }, "ix_sum_suggestion_title") + .IsUnique(); + + b.ToTable("sum_suggestion_header"); + + b.HasComment("总检建议头"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSummaryContent", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SumSummaryHeaderId") + .HasColumnType("uuid") + .HasColumnName("sum_summary_header_id") + .HasComment("建议头ID"); + + b.Property("SummaryContent") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("summary_content") + .HasComment("建议内容"); + + b.HasKey("Id"); + + b.HasIndex("SumSummaryHeaderId"); + + b.ToTable("sum_summary_content"); + + b.HasComment("总检综述内容"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSummaryHeader", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("病人登记ID"); + + b.Property("SummaryFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("summary_flag") + .HasComment("综述标志"); + + b.Property("SummaryTitle") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("summary_title") + .HasComment("综述标题"); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.ToTable("sum_summary_header"); + + b.HasComment("总检综述头"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Symptom", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("症状编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("症状名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("symptom"); + + b.HasComment("症状"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Sysdiagram", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("Definition") + .HasColumnType("bytea") + .HasColumnName("definition"); + + b.Property("DisplayName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("display_name"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PrincipalId") + .HasColumnType("uuid") + .HasColumnName("principal_id"); + + b.Property("Version") + .HasColumnType("integer") + .HasColumnName("version"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "PrincipalId", "DisplayName" }, "uk_principal_name") + .IsUnique(); + + b.ToTable("sysdiagrams"); + + b.HasComment("不是本软件的表,估计是系统自动生成的"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParm", b => + { + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("参数名"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("SysParmTypeId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("sys_parm_type_id") + .HasComment("参数类别ID"); + + b.Property("ValueType") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("value_type") + .HasComment("结果类别"); + + b.HasKey("Id"); + + b.HasIndex("SysParmTypeId"); + + b.ToTable("sys_parm"); + + b.HasComment("系统参数设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmType", b => + { + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("parent_id") + .HasComment("父ID"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("sys_parm_type"); + + b.HasComment("系统参数类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmValue", b => + { + b.Property("SysParmId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("sys_parm_id") + .HasComment("参数ID"); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id") + .IsFixedLength() + .HasComment("单位ID"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParmValue") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("parm_value") + .HasComment("参数值"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark") + .HasComment("备注"); + + b.HasKey("SysParmId", "OrganizationUnitId") + .HasName("pk_sys_parm_value"); + + b.ToTable("sys_parm_value"); + + b.HasComment("系统参数值设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmValueOption", b => + { + b.Property("SysParmId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("sys_parm_id"); + + b.Property("ValueOption") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("value_option") + .HasComment("可选项"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("ValueOptionName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("value_option_name") + .HasComment("可选项名"); + + b.HasKey("SysParmId", "ValueOption") + .HasName("pk_sys_parm_value_option"); + + b.ToTable("sys_parm_value_option"); + + b.HasComment("系统参数可选值设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.TitleType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("职称类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("职称类别名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_title_type") + .IsUnique(); + + b.ToTable("title_type"); + + b.HasComment("职称类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Unit", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("unit"); + + b.HasComment("单位设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.User", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Address") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("address"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DepartmentId") + .HasColumnType("uuid") + .HasColumnName("department_id") + .IsFixedLength(); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("Email") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("email"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LockScreenTimeInterval") + .HasColumnType("integer") + .HasColumnName("lock_screen_time_interval"); + + b.Property("ModifiedDate") + .ValueGeneratedOnAdd() + .HasColumnType("date") + .HasColumnName("modified_date") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("Modifier") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("modifier"); + + b.Property("PasswordHash") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("password_hash"); + + b.Property("PasswordSalt") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("password_salt"); + + b.Property("Photo") + .HasColumnType("bytea") + .HasColumnName("photo"); + + b.Property("PositionTypeId") + .HasColumnType("uuid") + .HasColumnName("position_type_id"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark"); + + b.Property("SexId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("sex_id"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("Telephone") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("telephone"); + + b.Property("TitleTypeId") + .HasColumnType("uuid") + .HasColumnName("title_type_id"); + + b.Property("UserTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("user_type_flag") + .HasDefaultValueSql("0") + .HasComment("用户类型"); + + b.HasKey("Id"); + + b.HasIndex("DepartmentId"); + + b.ToTable("users"); + + b.HasComment("用户表,废弃"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserDepartment", b => + { + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("DepartmentId") + .HasColumnType("uuid") + .HasColumnName("department_id") + .IsFixedLength(); + + b.HasKey("UserId", "DepartmentId") + .HasName("pk_user_operate_department"); + + b.HasIndex("DepartmentId"); + + b.ToTable("user_department"); + + b.HasComment("用户科室操作权限,废弃"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserGrouping", b => + { + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("GroupingId") + .HasColumnType("uuid") + .HasColumnName("grouping_id"); + + b.HasKey("UserId", "GroupingId") + .HasName("pk_user_grouping"); + + b.HasIndex("GroupingId"); + + b.ToTable("user_grouping"); + + b.HasComment("用户组权限-废弃"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserItemType", b => + { + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength() + .HasComment("项目类别ID"); + + b.HasKey("UserId", "ItemTypeId") + .HasName("pk_user_item_type"); + + b.HasIndex("ItemTypeId"); + + b.ToTable("user_item_type"); + + b.HasComment("用户项目类别权限设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserRight", b => + { + b.Property("Application") + .HasMaxLength(32) + .HasColumnType("character varying(32)") + .HasColumnName("application"); + + b.Property("WindowName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("window_name"); + + b.Property("ControlName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("control_name"); + + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("IsUser") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_user"); + + b.Property("Status") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("status"); + + b.HasKey("Application", "WindowName", "ControlName", "UserId", "IsUser") + .HasName("pk_sys_function"); + + b.ToTable("user_rights"); + + b.HasComment("用户控件权限-废弃"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("character varying(96)") + .HasColumnName("ApplicationName"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("BrowserInfo"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("ClientId"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("ClientIpAddress"); + + b.Property("ClientName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("ClientName"); + + b.Property("Comments") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("Comments"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("CorrelationId"); + + b.Property("Exceptions") + .HasColumnType("text"); + + b.Property("ExecutionDuration") + .HasColumnType("integer") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("timestamp without time zone"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("HttpMethod") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("HttpMethod"); + + b.Property("HttpStatusCode") + .HasColumnType("integer") + .HasColumnName("HttpStatusCode"); + + b.Property("ImpersonatorTenantId") + .HasColumnType("uuid") + .HasColumnName("ImpersonatorTenantId"); + + b.Property("ImpersonatorTenantName") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("ImpersonatorTenantName"); + + b.Property("ImpersonatorUserId") + .HasColumnType("uuid") + .HasColumnName("ImpersonatorUserId"); + + b.Property("ImpersonatorUserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("ImpersonatorUserName"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("TenantName"); + + b.Property("Url") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("Url"); + + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("UserId"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ExecutionTime"); + + b.HasIndex("TenantId", "UserId", "ExecutionTime"); + + b.ToTable("AbpAuditLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("AuditLogId") + .HasColumnType("uuid") + .HasColumnName("AuditLogId"); + + b.Property("ExecutionDuration") + .HasColumnType("integer") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("ExecutionTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("MethodName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("MethodName"); + + b.Property("Parameters") + .HasMaxLength(2000) + .HasColumnType("character varying(2000)") + .HasColumnName("Parameters"); + + b.Property("ServiceName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("ServiceName"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); + + b.ToTable("AbpAuditLogActions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("AuditLogId") + .HasColumnType("uuid") + .HasColumnName("AuditLogId"); + + b.Property("ChangeTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("ChangeTime"); + + b.Property("ChangeType") + .HasColumnType("smallint") + .HasColumnName("ChangeType"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("EntityId"); + + b.Property("EntityTenantId") + .HasColumnType("uuid"); + + b.Property("EntityTypeFullName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("EntityTypeFullName"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); + + b.ToTable("AbpEntityChanges", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("EntityChangeId") + .HasColumnType("uuid"); + + b.Property("NewValue") + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("NewValue"); + + b.Property("OriginalValue") + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("OriginalValue"); + + b.Property("PropertyName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("PropertyName"); + + b.Property("PropertyTypeFullName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("PropertyTypeFullName"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityChangeId"); + + b.ToTable("AbpEntityPropertyChanges", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsAbandoned") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false); + + b.Property("JobArgs") + .IsRequired() + .HasMaxLength(1048576) + .HasColumnType("character varying(1048576)"); + + b.Property("JobName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("LastTryTime") + .HasColumnType("timestamp without time zone"); + + b.Property("NextTryTime") + .HasColumnType("timestamp without time zone"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasDefaultValue((byte)15); + + b.Property("TryCount") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasDefaultValue((short)0); + + b.HasKey("Id"); + + b.HasIndex("IsAbandoned", "NextTryTime"); + + b.ToTable("AbpBackgroundJobs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpFeatureValues", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsStatic") + .HasColumnType("boolean"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("Regex") + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("RegexDescription") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("Required") + .HasColumnType("boolean"); + + b.Property("ValueType") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("SourceTenantId") + .HasColumnType("uuid"); + + b.Property("SourceUserId") + .HasColumnType("uuid"); + + b.Property("TargetTenantId") + .HasColumnType("uuid"); + + b.Property("TargetUserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique(); + + b.ToTable("AbpLinkUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDefault") + .HasColumnType("boolean") + .HasColumnName("IsDefault"); + + b.Property("IsPublic") + .HasColumnType("boolean") + .HasColumnName("IsPublic"); + + b.Property("IsStatic") + .HasColumnType("boolean") + .HasColumnName("IsStatic"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.Property("RoleId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Action") + .HasMaxLength(96) + .HasColumnType("character varying(96)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("character varying(96)"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("Identity") + .HasMaxLength(96) + .HasColumnType("character varying(96)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Action"); + + b.HasIndex("TenantId", "ApplicationName"); + + b.HasIndex("TenantId", "Identity"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSecurityLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("boolean") + .HasColumnName("IsActive"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsExternal") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsExternal"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); + + b.Property("LockoutEnd") + .HasColumnType("timestamp with time zone"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("Name"); + + b.Property("NormalizedEmail") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("NormalizedEmail"); + + b.Property("NormalizedUserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("NormalizedUserName"); + + b.Property("PasswordHash") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("PasswordHash"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("SecurityStamp"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("Email"); + + b.HasIndex("NormalizedEmail"); + + b.HasIndex("NormalizedUserName"); + + b.HasIndex("UserName"); + + b.ToTable("AbpUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderDisplayName") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(196) + .HasColumnType("character varying(196)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "LoginProvider"); + + b.HasIndex("LoginProvider", "ProviderKey"); + + b.ToTable("AbpUserLogins", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uuid"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "UserId"); + + b.HasIndex("UserId", "OrganizationUnitId"); + + b.ToTable("AbpUserOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("RoleId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId", "UserId"); + + b.ToTable("AbpUserRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasColumnType("text"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(95) + .HasColumnType("character varying(95)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsPeis") + .HasMaxLength(1) + .HasColumnType("character varying(1)"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code"); + + b.HasIndex("ParentId"); + + b.ToTable("AbpOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uuid"); + + b.Property("RoleId") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "RoleId"); + + b.HasIndex("RoleId", "OrganizationUnitId"); + + b.ToTable("AbpOrganizationUnitRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ClientId") + .HasMaxLength(100) + .HasColumnType("character varying(100)"); + + b.Property("ClientSecret") + .HasColumnType("text"); + + b.Property("ClientUri") + .HasColumnType("text"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConsentType") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .HasColumnType("text"); + + b.Property("DisplayNames") + .HasColumnType("text"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LogoUri") + .HasColumnType("text"); + + b.Property("Permissions") + .HasColumnType("text"); + + b.Property("PostLogoutRedirectUris") + .HasColumnType("text"); + + b.Property("Properties") + .HasColumnType("text"); + + b.Property("RedirectUris") + .HasColumnType("text"); + + b.Property("Requirements") + .HasColumnType("text"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("OpenIddictApplications", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ApplicationId") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("timestamp without time zone"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Properties") + .HasColumnType("text"); + + b.Property("Scopes") + .HasColumnType("text"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("character varying(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictAuthorizations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Scopes.OpenIddictScope", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("text"); + + b.Property("Descriptions") + .HasColumnType("text"); + + b.Property("DisplayName") + .HasColumnType("text"); + + b.Property("DisplayNames") + .HasColumnType("text"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(200) + .HasColumnType("character varying(200)"); + + b.Property("Properties") + .HasColumnType("text"); + + b.Property("Resources") + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("OpenIddictScopes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ApplicationId") + .HasColumnType("uuid"); + + b.Property("AuthorizationId") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("timestamp without time zone"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExpirationDate") + .HasColumnType("timestamp without time zone"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Payload") + .HasColumnType("text"); + + b.Property("Properties") + .HasColumnType("text"); + + b.Property("RedemptionDate") + .HasColumnType("timestamp without time zone"); + + b.Property("ReferenceId") + .HasMaxLength(100) + .HasColumnType("character varying(100)"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("character varying(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.HasKey("Id"); + + b.HasIndex("AuthorizationId"); + + b.HasIndex("ReferenceId"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpPermissionGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("character varying(2048)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpSettings", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("AbpTenants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("uuid"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.HasKey("TenantId", "Name"); + + b.ToTable("AbpTenantConnectionStrings", (string)null); + }); + + modelBuilder.Entity("ChildDiagnosis", b => + { + b.HasOne("Shentun.Peis.Models.Diagnosis", null) + .WithMany() + .HasForeignKey("DiagnosisId") + .IsRequired() + .HasConstraintName("fk_child_diagnosis_diagnosis1"); + + b.HasOne("Shentun.Peis.Models.Diagnosis", null) + .WithMany() + .HasForeignKey("ParentDiagnosisId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_child_diagnosis_diagnosis"); + }); + + modelBuilder.Entity("RoomAsbitem", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", null) + .WithMany() + .HasForeignKey("AsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_room_asbitem_asbitem"); + + b.HasOne("Shentun.Peis.Models.Room", null) + .WithMany() + .HasForeignKey("RoomId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_room_asbitem_room"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.HelloA", b => + { + b.HasOne("Shentun.Peis.Books.HelloType", "HelloType") + .WithMany("HelloAs") + .HasForeignKey("HelloTypeId") + .IsRequired() + .HasConstraintName("fk_hello_a_hello_type"); + + b.Navigation("HelloType"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.TestB", b => + { + b.HasOne("Shentun.Peis.Books.TestA", "TestAs") + .WithMany("TestBs") + .HasForeignKey("TestAsAId"); + + b.Navigation("TestAs"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Asbitem", b => + { + b.HasOne("Shentun.Peis.Models.InvoiceItemType", "InvoiceItemType") + .WithMany("Asbitems") + .HasForeignKey("InvoiceItemTypeId") + .IsRequired() + .HasConstraintName("fk_asbitem_invoice_item_type"); + + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("Asbitems") + .HasForeignKey("ItemTypeId") + .IsRequired() + .HasConstraintName("fk_asbitem_item_type"); + + b.Navigation("InvoiceItemType"); + + b.Navigation("ItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.AsbitemDetail", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithMany("AsbitemDetails") + .HasForeignKey("AsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_asbitem_detail_asbitem"); + + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("AsbitemDetails") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_asbitem_detail_item"); + + b.Navigation("Asbitem"); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultConclusion", b => + { + b.HasOne("Shentun.Peis.Models.BigtextResultTemplate", "BigtextResultTemplate") + .WithMany("BigtextResultConclusions") + .HasForeignKey("BigtextResultTemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_bigtext"); + + b.Navigation("BigtextResultTemplate"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultDescription", b => + { + b.HasOne("Shentun.Peis.Models.BigtextResultTemplate", "BigtextResultTemplate") + .WithMany("BigtextResultDescriptions") + .HasForeignKey("BigtextResultTemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_bigtext"); + + b.Navigation("BigtextResultTemplate"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultTemplate", b => + { + b.HasOne("Shentun.Peis.Models.BigtextResultType", "BigtextResultType") + .WithMany("BigtextResultTemplates") + .HasForeignKey("BigtextResultTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_bigtext"); + + b.Navigation("BigtextResultType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultType", b => + { + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("BigtextResultTypes") + .HasForeignKey("ItemTypeId") + .IsRequired() + .HasConstraintName("fk_bigtext"); + + b.Navigation("ItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardBill", b => + { + b.HasOne("Shentun.Peis.Models.CardRegister", "CardRegister") + .WithMany("CardBills") + .HasForeignKey("CardRegisterId") + .IsRequired() + .HasConstraintName("fk_card_bil_reference_card_reg"); + + b.HasOne("Shentun.Peis.Models.PayMode", "PayMode") + .WithMany("CardBills") + .HasForeignKey("PayModeId") + .HasConstraintName("fk_card_bill_payment_mode"); + + b.Navigation("CardRegister"); + + b.Navigation("PayMode"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardRegister", b => + { + b.HasOne("Shentun.Peis.Models.CardType", "CardType") + .WithMany("CardRegisters") + .HasForeignKey("CardTypeId") + .IsRequired() + .HasConstraintName("fk_card_reg_reference_card_typ"); + + b.HasOne("Shentun.Peis.Models.Department", "OrganizationUnit") + .WithMany("CardRegisters") + .HasForeignKey("OrganizationUnitId") + .IsRequired() + .HasConstraintName("fk_card_register_department"); + + b.Navigation("CardType"); + + b.Navigation("OrganizationUnit"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Charge", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("Charges") + .HasForeignKey("PatientRegisterId") + .IsRequired() + .HasConstraintName("fk_patient_register_charge"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeAsbitem", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithMany("ChargeAsbitems") + .HasForeignKey("AsbitemId") + .IsRequired() + .HasConstraintName("fk_charge_asbitem_asbitem"); + + b.HasOne("Shentun.Peis.Models.Charge", "Charge") + .WithMany("ChargeAsbitems") + .HasForeignKey("ChargeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_charge_asbitem_charge"); + + b.Navigation("Asbitem"); + + b.Navigation("Charge"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeBack", b => + { + b.HasOne("Shentun.Peis.Models.Charge", "Charge") + .WithMany("ChargeBacks") + .HasForeignKey("ChargeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_bill_bac_reference_bill"); + + b.Navigation("Charge"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeBackPay", b => + { + b.HasOne("Shentun.Peis.Models.ChargeBack", "ChargeBack") + .WithMany("ChargeBackPays") + .HasForeignKey("ChargeBackId") + .IsRequired() + .HasConstraintName("fk_charge_back_pay_charge_back"); + + b.HasOne("Shentun.Peis.Models.PayMode", "PayMode") + .WithMany("ChargeBackPays") + .HasForeignKey("PayModeId") + .IsRequired() + .HasConstraintName("fk_charge_back_pay_pay_mode"); + + b.Navigation("ChargeBack"); + + b.Navigation("PayMode"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargePay", b => + { + b.HasOne("Shentun.Peis.Models.Charge", "Charge") + .WithMany("ChargePays") + .HasForeignKey("ChargeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_charge_payment_mode_charge"); + + b.HasOne("Shentun.Peis.Models.PayMode", "PayMode") + .WithMany("ChargePays") + .HasForeignKey("PayModeId") + .IsRequired() + .HasConstraintName("fk_charge_"); + + b.Navigation("Charge"); + + b.Navigation("PayMode"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargePriceItem", b => + { + b.HasOne("Shentun.Peis.Models.ChargeAsbitem", "ChargeAsbitem") + .WithMany("ChargePriceItems") + .HasForeignKey("ChargeAsbitemId") + .IsRequired() + .HasConstraintName("fk_charge_asbitem"); + + b.Navigation("ChargeAsbitem"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CommonChar", b => + { + b.HasOne("Shentun.Peis.Models.CommonCharType", "CommonCharType") + .WithMany("CommonChars") + .HasForeignKey("CommonCharTypeId") + .IsRequired() + .HasConstraintName("fk_common_char_common_char_type"); + + b.Navigation("CommonCharType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ContactMethod", b => + { + b.HasOne("Shentun.Peis.Models.ContactPerson", "ContactPerson") + .WithMany("ContactMethods") + .HasForeignKey("ContactPersonId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_contact_method_contact"); + + b.Navigation("ContactPerson"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ContactPerson", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrg", "CustomerOrg") + .WithMany("ContactPeople") + .HasForeignKey("CustomerOrgId") + .IsRequired() + .HasConstraintName("fk_contact_org"); + + b.Navigation("CustomerOrg"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CriticalValue", b => + { + b.HasOne("Shentun.Peis.Models.CriticalValueType", "CriticalValueType") + .WithMany("CriticalValues") + .HasForeignKey("CriticalValueTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_critica"); + + b.Navigation("CriticalValueType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgCharge", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgRegister", "CustomerOrgRegister") + .WithMany("CustomerOrgCharges") + .HasForeignKey("CustomerOrgRegisterId") + .IsRequired() + .HasConstraintName("fk_customer_org_charge_register"); + + b.Navigation("CustomerOrgRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargeBack", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgCharge", "CustomerOrgCharge") + .WithMany("CustomerOrgChargeBacks") + .HasForeignKey("CustomerOrgChargeId") + .IsRequired() + .HasConstraintName("fk_org_charge_back_org_charge"); + + b.Navigation("CustomerOrgCharge"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargeBackPay", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgChargeBack", "CustomerOrgChargeBack") + .WithMany("CustomerOrgChargeBackPays") + .HasForeignKey("CustomerOrgChargeBackId") + .IsRequired() + .HasConstraintName("fk_org_cha"); + + b.HasOne("Shentun.Peis.Models.PayMode", "PayMode") + .WithMany("CustomerOrgChargeBackPays") + .HasForeignKey("PayModeId") + .IsRequired() + .HasConstraintName("fk_org_charge_back_pay_pay_mode"); + + b.Navigation("CustomerOrgChargeBack"); + + b.Navigation("PayMode"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargePay", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgCharge", "CustomerOrgCharge") + .WithOne("CustomerOrgChargePay") + .HasForeignKey("Shentun.Peis.Models.CustomerOrgChargePay", "Id") + .IsRequired() + .HasConstraintName("fk_org_charge_pay_org_charge"); + + b.HasOne("Shentun.Peis.Models.PayMode", "PayMode") + .WithMany("CustomerOrgChargePays") + .HasForeignKey("PayModeId") + .HasConstraintName("fk_org_charge_pay_pay_mode"); + + b.Navigation("CustomerOrgCharge"); + + b.Navigation("PayMode"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgGroup", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgRegister", "CustomerOrgRegister") + .WithMany("CustomerOrgGroups") + .HasForeignKey("CustomerOrgRegisterId") + .IsRequired() + .HasConstraintName("fk_customer_org_group_register"); + + b.Navigation("CustomerOrgRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgGroupDetail", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithMany("CustomerOrgGroupDetails") + .HasForeignKey("AsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_org_group_detail_asbitem"); + + b.HasOne("Shentun.Peis.Models.CustomerOrgGroup", "CustomerOrgGroup") + .WithMany("CustomerOrgGroupDetails") + .HasForeignKey("CustomerOrgGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_org_group_detail_org_group"); + + b.Navigation("Asbitem"); + + b.Navigation("CustomerOrgGroup"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgRegister", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrg", "CustomerOrg") + .WithMany("CustomerOrgRegisters") + .HasForeignKey("CustomerOrgId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_org_medi_reference_org"); + + b.Navigation("CustomerOrg"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Diagnosis", b => + { + b.HasOne("Shentun.Peis.Models.DiagnosisLevel", "DiagnosisLevel") + .WithMany("Diagnoses") + .HasForeignKey("DiagnosisLevelId") + .IsRequired() + .HasConstraintName("fk_diagnosis_diagnosis_level"); + + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("Diagnoses") + .HasForeignKey("ItemTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_diagnosis_item_type"); + + b.Navigation("DiagnosisLevel"); + + b.Navigation("ItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisTemplateDetail", b => + { + b.HasOne("Shentun.Peis.Models.Diagnosis", "Diagnosis") + .WithMany("DiagnosisTemplateDetails") + .HasForeignKey("DiagnosisId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_diagnos"); + + b.HasOne("Shentun.Peis.Models.DiagnosisTemplate", "DiagnosisTemplate") + .WithMany("DiagnosisTemplateDetails") + .HasForeignKey("DiagnosisTemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_diagno2"); + + b.Navigation("Diagnosis"); + + b.Navigation("DiagnosisTemplate"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.HealthCertificate", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithOne("HealthCertificate") + .HasForeignKey("Shentun.Peis.Models.HealthCertificate", "Id") + .IsRequired() + .HasConstraintName("fk_health_"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Item", b => + { + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("Items") + .HasForeignKey("ItemTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_item_type"); + + b.Navigation("ItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultMatch", b => + { + b.HasOne("Shentun.Peis.Models.Diagnosis", "Diagnosis") + .WithMany("ItemResultMatches") + .HasForeignKey("DiagnosisId") + .IsRequired() + .HasConstraintName("fk_item_result_match_diagnosis"); + + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("ItemResultMatches") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_res_reference_item1"); + + b.Navigation("Diagnosis"); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultTemplate", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("ItemResultTemplates") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_res_reference_item"); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultTemplateType", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("ItemResultTemplateTypes") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_re"); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemTemplateDetail", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("ItemTemplateDetails") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_template_detail_item"); + + b.HasOne("Shentun.Peis.Models.ItemTemplate", "ItemTemplate") + .WithMany("ItemTemplateDetails") + .HasForeignKey("ItemTemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_te"); + + b.Navigation("Item"); + + b.Navigation("ItemTemplate"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemType", b => + { + b.HasOne("Shentun.Peis.Models.GuideType", "GuidType") + .WithMany("ItemTypes") + .HasForeignKey("GuidTypeId") + .IsRequired() + .HasConstraintName("fk_item_type_guide_type"); + + b.HasOne("Shentun.Peis.Models.MedicalReportType", "MedicalReportType") + .WithMany("ItemTypes") + .HasForeignKey("MedicalReportTypeId") + .IsRequired() + .HasConstraintName("fk_item_ty"); + + b.Navigation("GuidType"); + + b.Navigation("MedicalReportType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.LisRequest", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("LisRequests") + .HasForeignKey("PatientRegisterId") + .IsRequired() + .HasConstraintName("fk_lis_request_patient_register"); + + b.HasOne("Shentun.Peis.Models.SampleContainer", "SampleContainer") + .WithMany("LisRequests") + .HasForeignKey("SampleContainerId") + .IsRequired() + .HasConstraintName("fk_lis_request_sample_container"); + + b.HasOne("Shentun.Peis.Models.SampleType", "SampleType") + .WithMany("LisRequests") + .HasForeignKey("SampleTypeId") + .IsRequired() + .HasConstraintName("fk_lis_request_sample_type"); + + b.Navigation("PatientRegister"); + + b.Navigation("SampleContainer"); + + b.Navigation("SampleType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalConclusion", b => + { + b.HasOne("Shentun.Peis.Models.MedicalConclusionType", "MedicalConclusionType") + .WithMany("MedicalConclusions") + .HasForeignKey("MedicalConclusionTypeId") + .HasConstraintName("fk_medical"); + + b.Navigation("MedicalConclusionType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalPackageDetail", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithMany("MedicalPackageDetails") + .HasForeignKey("AsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_medical"); + + b.HasOne("Shentun.Peis.Models.MedicalPackage", "MedicalPackage") + .WithMany("MedicalPackageDetails") + .HasForeignKey("MedicalPackageId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_medica2"); + + b.Navigation("Asbitem"); + + b.Navigation("MedicalPackage"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.OrganizationUnitsCustomerOrg", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrg", "CustomerOrg") + .WithMany("OrganizationUnitsCustomerOrgs") + .HasForeignKey("CustomerOrgId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_medical_center_org_org"); + + b.HasOne("Shentun.Peis.Models.Department", "OrganizationUnit") + .WithMany("OrganizationUnitsCustomerOrgs") + .HasForeignKey("OrganizationUnitId") + .IsRequired() + .HasConstraintName("fk_medical"); + + b.Navigation("CustomerOrg"); + + b.Navigation("OrganizationUnit"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientOccupationalDisease", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithOne("PatientOccupationalDisease") + .HasForeignKey("Shentun.Peis.Models.PatientOccupationalDisease", "Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_patient"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientOccupationalHistory", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("PatientOccupationalHistories") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_occupat"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientPoison", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("PatientPoisons") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_patient"); + + b.HasOne("Shentun.Peis.Models.Poison", "Poison") + .WithMany("PatientPoisons") + .HasForeignKey("PoisonId") + .IsRequired() + .HasConstraintName("fk_patient_poison_poison"); + + b.Navigation("PatientRegister"); + + b.Navigation("Poison"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientRegister", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgRegister", "CustomerOrgRegister") + .WithMany("PatientRegisters") + .HasForeignKey("CustomerOrgRegisterId") + .IsRequired() + .HasConstraintName("fk_patient_register_org_register"); + + b.HasOne("Shentun.Peis.Models.MaritalStatus", "MaritalStatus") + .WithMany("PatientRegisters") + .HasForeignKey("MaritalStatusId") + .IsRequired() + .HasConstraintName("fk_patient_register_marital_status_id"); + + b.Navigation("CustomerOrgRegister"); + + b.Navigation("MaritalStatus"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientSymptom", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("PatientSymptoms") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_patient"); + + b.HasOne("Shentun.Peis.Models.Symptom", "Symptom") + .WithMany("PatientSymptoms") + .HasForeignKey("SymptomId") + .IsRequired() + .HasConstraintName("fk_patient_symptom_symptom"); + + b.Navigation("PatientRegister"); + + b.Navigation("Symptom"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PhoneFollow", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("PhoneFollows") + .HasForeignKey("PatientRegisterId") + .IsRequired() + .HasConstraintName("fk_phone_f"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Poison", b => + { + b.HasOne("Shentun.Peis.Models.PoisonType", "PoisonType") + .WithMany("Poisons") + .HasForeignKey("PoisonTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_poison_poison_type"); + + b.Navigation("PoisonType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PriceItem", b => + { + b.HasOne("Shentun.Peis.Models.InvoiceItemType", "InvoiceItemType") + .WithMany("PriceItems") + .HasForeignKey("InvoiceItemTypeId") + .IsRequired() + .HasConstraintName("fk_price_item_invoice_item_type"); + + b.Navigation("InvoiceItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.QueueRegister", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("QueueRegisters") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_queue_r"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ReferenceRange", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("ReferenceRanges") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_referenc_reference_item"); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterAsbitem", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithMany("RegisterAsbitems") + .HasForeignKey("AsbitemId") + .IsRequired() + .HasConstraintName("fk_register_reference_asbitem"); + + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("RegisterAsbitems") + .HasForeignKey("PatientRegisterId") + .IsRequired() + .HasConstraintName("fk_register_reference_patient_"); + + b.HasOne("Shentun.Peis.Models.RegisterCheck", "RegisterCheck") + .WithMany("RegisterAsbitems") + .HasForeignKey("RegisterCheckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_registe"); + + b.Navigation("Asbitem"); + + b.Navigation("PatientRegister"); + + b.Navigation("RegisterCheck"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckItem", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("RegisterCheckItems") + .HasForeignKey("ItemId") + .IsRequired() + .HasConstraintName("fk_register_reference_item"); + + b.HasOne("Shentun.Peis.Models.RegisterCheck", "RegisterCheck") + .WithMany("RegisterCheckItems") + .HasForeignKey("RegisterCheckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_register_item_register_check"); + + b.HasOne("Shentun.Peis.Models.ResultStatus", "ResultStatus") + .WithMany("RegisterCheckItems") + .HasForeignKey("ResultStatusId") + .HasConstraintName("fk_register_item_result_status"); + + b.Navigation("Item"); + + b.Navigation("RegisterCheck"); + + b.Navigation("ResultStatus"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckPicture", b => + { + b.HasOne("Shentun.Peis.Models.RegisterCheck", "RegisterCheck") + .WithMany("RegisterCheckPictures") + .HasForeignKey("RegisterCheckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_check_picture_register_check"); + + b.Navigation("RegisterCheck"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckSuggestion", b => + { + b.HasOne("Shentun.Peis.Models.RegisterCheck", "RegisterCheck") + .WithMany("RegisterCheckSuggestions") + .HasForeignKey("RegisterCheckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_registe"); + + b.Navigation("RegisterCheck"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckSummary", b => + { + b.HasOne("Shentun.Peis.Models.RegisterCheck", "RegisterCheck") + .WithMany("RegisterCheckSummaries") + .HasForeignKey("RegisterCheckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_registe"); + + b.Navigation("RegisterCheck"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Room", b => + { + b.HasOne("Shentun.Peis.Models.Department", "Department") + .WithMany("Rooms") + .HasForeignKey("DepartmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_room_department"); + + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("Rooms") + .HasForeignKey("ItemTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_room_item_type"); + + b.Navigation("Department"); + + b.Navigation("ItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleGroup", b => + { + b.HasOne("Shentun.Peis.Models.SampleContainer", "SampleContainer") + .WithMany("SampleGroups") + .HasForeignKey("SampleContainerId") + .IsRequired() + .HasConstraintName("fk_sample_"); + + b.HasOne("Shentun.Peis.Models.SampleType", "SampleType") + .WithMany("SampleGroups") + .HasForeignKey("SampleTypeId") + .IsRequired() + .HasConstraintName("fk_sample_group_sample_type"); + + b.Navigation("SampleContainer"); + + b.Navigation("SampleType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleGroupDetail", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithOne("SampleGroupDetail") + .HasForeignKey("Shentun.Peis.Models.SampleGroupDetail", "AsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sample_group_detail_asbitem"); + + b.HasOne("Shentun.Peis.Models.SampleGroup", "SampleGroup") + .WithMany("SampleGroupDetails") + .HasForeignKey("SampleGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sample_"); + + b.Navigation("Asbitem"); + + b.Navigation("SampleGroup"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ServiceTrade", b => + { + b.HasOne("Shentun.Peis.Models.Department", "Department") + .WithMany("ServiceTrades") + .HasForeignKey("DepartmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_service_trades_department"); + + b.Navigation("Department"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SexHormoneReferenceRange", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("SexHormoneReferenceRanges") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sex_hor"); + + b.HasOne("Shentun.Peis.Models.SexHormoneTerm", "SexHormoneTerm") + .WithMany("SexHormoneReferenceRanges") + .HasForeignKey("SexHormoneTermId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sex_ho2"); + + b.Navigation("Item"); + + b.Navigation("SexHormoneTerm"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Suggestion", b => + { + b.HasOne("Shentun.Peis.Models.Diagnosis", "Diagnosis") + .WithMany("Suggestions") + .HasForeignKey("DiagnosisId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_suggestion_diagnosis"); + + b.Navigation("Diagnosis"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumDiagnosis", b => + { + b.HasOne("Shentun.Peis.Models.Diagnosis", "Diagnosis") + .WithMany("SumDiagnoses") + .HasForeignKey("DiagnosisId") + .IsRequired() + .HasConstraintName("fk_sum_diagnosis_diagnosis"); + + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("SumDiagnoses") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sum_dia"); + + b.Navigation("Diagnosis"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSuggestionContent", b => + { + b.HasOne("Shentun.Peis.Models.SumSuggestionHeader", "SumSuggestionHeader") + .WithMany("SumSuggestionContents") + .HasForeignKey("SumSuggestionHeaderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sum_sug"); + + b.Navigation("SumSuggestionHeader"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSuggestionHeader", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("SumSuggestionHeaders") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sum_sug"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSummaryContent", b => + { + b.HasOne("Shentun.Peis.Models.SumSummaryHeader", "SumSummaryHeader") + .WithMany("SumSummaryContents") + .HasForeignKey("SumSummaryHeaderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sum_sum"); + + b.Navigation("SumSummaryHeader"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSummaryHeader", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("SumSummaryHeaders") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sum_sum"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParm", b => + { + b.HasOne("Shentun.Peis.Models.SysParmType", "SysParmType") + .WithMany("SysParms") + .HasForeignKey("SysParmTypeId") + .HasConstraintName("fk_sys_parm_sys_parm_type"); + + b.Navigation("SysParmType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmValue", b => + { + b.HasOne("Shentun.Peis.Models.SysParm", "SysParm") + .WithMany("SysParmValues") + .HasForeignKey("SysParmId") + .IsRequired() + .HasConstraintName("fk_sys_parm_value_sys_parm"); + + b.Navigation("SysParm"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmValueOption", b => + { + b.HasOne("Shentun.Peis.Models.SysParm", "SysParm") + .WithMany("SysParmValueOptions") + .HasForeignKey("SysParmId") + .IsRequired() + .HasConstraintName("fk_sys_par"); + + b.Navigation("SysParm"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.User", b => + { + b.HasOne("Shentun.Peis.Models.Department", "Department") + .WithMany("Users") + .HasForeignKey("DepartmentId") + .IsRequired() + .HasConstraintName("fk_user_department"); + + b.Navigation("Department"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserDepartment", b => + { + b.HasOne("Shentun.Peis.Models.Department", "Department") + .WithMany("UserDepartments") + .HasForeignKey("DepartmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_op"); + + b.HasOne("Shentun.Peis.Models.User", "User") + .WithMany("UserDepartments") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_o2"); + + b.Navigation("Department"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserGrouping", b => + { + b.HasOne("Shentun.Peis.Models.Grouping", "Grouping") + .WithMany("UserGroupings") + .HasForeignKey("GroupingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_grouping_grouping"); + + b.HasOne("Shentun.Peis.Models.User", "User") + .WithMany("UserGroupings") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_grouping_users"); + + b.Navigation("Grouping"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserItemType", b => + { + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("UserItemTypes") + .HasForeignKey("ItemTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_item_type_item_type"); + + b.HasOne("Shentun.Peis.Models.User", "User") + .WithMany("UserItemTypes") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_item_type_users"); + + b.Navigation("ItemType"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("Actions") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("EntityChanges") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.EntityChange", null) + .WithMany("PropertyChanges") + .HasForeignKey("EntityChangeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany("Claims") + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Claims") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Logins") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("OrganizationUnits") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Roles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Tokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("ParentId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany("Roles") + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + + b.HasOne("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", null) + .WithMany() + .HasForeignKey("AuthorizationId"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.HasOne("Volo.Abp.TenantManagement.Tenant", null) + .WithMany("ConnectionStrings") + .HasForeignKey("TenantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Shentun.Peis.Books.HelloType", b => + { + b.Navigation("HelloAs"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.TestA", b => + { + b.Navigation("TestBs"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Asbitem", b => + { + b.Navigation("AsbitemDetails"); + + b.Navigation("ChargeAsbitems"); + + b.Navigation("CustomerOrgGroupDetails"); + + b.Navigation("MedicalPackageDetails"); + + b.Navigation("RegisterAsbitems"); + + b.Navigation("SampleGroupDetail"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultTemplate", b => + { + b.Navigation("BigtextResultConclusions"); + + b.Navigation("BigtextResultDescriptions"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultType", b => + { + b.Navigation("BigtextResultTemplates"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardRegister", b => + { + b.Navigation("CardBills"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardType", b => + { + b.Navigation("CardRegisters"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Charge", b => + { + b.Navigation("ChargeAsbitems"); + + b.Navigation("ChargeBacks"); + + b.Navigation("ChargePays"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeAsbitem", b => + { + b.Navigation("ChargePriceItems"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeBack", b => + { + b.Navigation("ChargeBackPays"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CommonCharType", b => + { + b.Navigation("CommonChars"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ContactPerson", b => + { + b.Navigation("ContactMethods"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CriticalValueType", b => + { + b.Navigation("CriticalValues"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrg", b => + { + b.Navigation("ContactPeople"); + + b.Navigation("CustomerOrgRegisters"); + + b.Navigation("OrganizationUnitsCustomerOrgs"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgCharge", b => + { + b.Navigation("CustomerOrgChargeBacks"); + + b.Navigation("CustomerOrgChargePay"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargeBack", b => + { + b.Navigation("CustomerOrgChargeBackPays"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgGroup", b => + { + b.Navigation("CustomerOrgGroupDetails"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgRegister", b => + { + b.Navigation("CustomerOrgCharges"); + + b.Navigation("CustomerOrgGroups"); + + b.Navigation("PatientRegisters"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Department", b => + { + b.Navigation("CardRegisters"); + + b.Navigation("OrganizationUnitsCustomerOrgs"); + + b.Navigation("Rooms"); + + b.Navigation("ServiceTrades"); + + b.Navigation("UserDepartments"); + + b.Navigation("Users"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Diagnosis", b => + { + b.Navigation("DiagnosisTemplateDetails"); + + b.Navigation("ItemResultMatches"); + + b.Navigation("Suggestions"); + + b.Navigation("SumDiagnoses"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisLevel", b => + { + b.Navigation("Diagnoses"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisTemplate", b => + { + b.Navigation("DiagnosisTemplateDetails"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Grouping", b => + { + b.Navigation("UserGroupings"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.GuideType", b => + { + b.Navigation("ItemTypes"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.InvoiceItemType", b => + { + b.Navigation("Asbitems"); + + b.Navigation("PriceItems"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Item", b => + { + b.Navigation("AsbitemDetails"); + + b.Navigation("ItemResultMatches"); + + b.Navigation("ItemResultTemplateTypes"); + + b.Navigation("ItemResultTemplates"); + + b.Navigation("ItemTemplateDetails"); + + b.Navigation("ReferenceRanges"); + + b.Navigation("RegisterCheckItems"); + + b.Navigation("SexHormoneReferenceRanges"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemTemplate", b => + { + b.Navigation("ItemTemplateDetails"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemType", b => + { + b.Navigation("Asbitems"); + + b.Navigation("BigtextResultTypes"); + + b.Navigation("Diagnoses"); + + b.Navigation("Items"); + + b.Navigation("Rooms"); + + b.Navigation("UserItemTypes"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MaritalStatus", b => + { + b.Navigation("PatientRegisters"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalConclusionType", b => + { + b.Navigation("MedicalConclusions"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalPackage", b => + { + b.Navigation("MedicalPackageDetails"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalReportType", b => + { + b.Navigation("ItemTypes"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientRegister", b => + { + b.Navigation("Charges"); + + b.Navigation("HealthCertificate"); + + b.Navigation("LisRequests"); + + b.Navigation("PatientOccupationalDisease"); + + b.Navigation("PatientOccupationalHistories"); + + b.Navigation("PatientPoisons"); + + b.Navigation("PatientSymptoms"); + + b.Navigation("PhoneFollows"); + + b.Navigation("QueueRegisters"); + + b.Navigation("RegisterAsbitems"); + + b.Navigation("SumDiagnoses"); + + b.Navigation("SumSuggestionHeaders"); + + b.Navigation("SumSummaryHeaders"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PayMode", b => + { + b.Navigation("CardBills"); + + b.Navigation("ChargeBackPays"); + + b.Navigation("ChargePays"); + + b.Navigation("CustomerOrgChargeBackPays"); + + b.Navigation("CustomerOrgChargePays"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Poison", b => + { + b.Navigation("PatientPoisons"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PoisonType", b => + { + b.Navigation("Poisons"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheck", b => + { + b.Navigation("RegisterAsbitems"); + + b.Navigation("RegisterCheckItems"); + + b.Navigation("RegisterCheckPictures"); + + b.Navigation("RegisterCheckSuggestions"); + + b.Navigation("RegisterCheckSummaries"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ResultStatus", b => + { + b.Navigation("RegisterCheckItems"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleContainer", b => + { + b.Navigation("LisRequests"); + + b.Navigation("SampleGroups"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleGroup", b => + { + b.Navigation("SampleGroupDetails"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleType", b => + { + b.Navigation("LisRequests"); + + b.Navigation("SampleGroups"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SexHormoneTerm", b => + { + b.Navigation("SexHormoneReferenceRanges"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSuggestionHeader", b => + { + b.Navigation("SumSuggestionContents"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSummaryHeader", b => + { + b.Navigation("SumSummaryContents"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Symptom", b => + { + b.Navigation("PatientSymptoms"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParm", b => + { + b.Navigation("SysParmValueOptions"); + + b.Navigation("SysParmValues"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmType", b => + { + b.Navigation("SysParms"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.User", b => + { + b.Navigation("UserDepartments"); + + b.Navigation("UserGroupings"); + + b.Navigation("UserItemTypes"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Navigation("Actions"); + + b.Navigation("EntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Navigation("PropertyChanges"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Navigation("Claims"); + + b.Navigation("Logins"); + + b.Navigation("OrganizationUnits"); + + b.Navigation("Roles"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Navigation("Roles"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230619083032_zmremark.cs b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230619083032_zmremark.cs new file mode 100644 index 00000000..b3be68d5 --- /dev/null +++ b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230619083032_zmremark.cs @@ -0,0 +1,6082 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Shentun.Peis.Migrations +{ + public partial class zmremark : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterTable( + name: "users", + comment: "用户表,废弃"); + + migrationBuilder.AlterTable( + name: "user_rights", + comment: "用户控件权限-废弃"); + + migrationBuilder.AlterTable( + name: "user_grouping", + comment: "用户组权限-废弃"); + + migrationBuilder.AlterTable( + name: "user_department", + comment: "用户科室操作权限,废弃", + oldComment: "用户科室操作权限"); + + migrationBuilder.AlterTable( + name: "sysdiagrams", + comment: "不是本软件的表,估计是系统自动生成的"); + + migrationBuilder.AlterTable( + name: "sms_type", + comment: "短信类别"); + + migrationBuilder.AlterTable( + name: "sms_template", + comment: "短信模板"); + + migrationBuilder.AlterTable( + name: "sms_send", + comment: "短信发送"); + + migrationBuilder.AlterTable( + name: "primarykey_builder", + comment: "主键产生器,废弃", + oldComment: "主键产生器"); + + migrationBuilder.AlterTable( + name: "patient_symptom", + comment: "职业病-体检病人症状"); + + migrationBuilder.AlterTable( + name: "operate_log", + comment: "作日志,已经废弃", + oldComment: "操作日志"); + + migrationBuilder.AlterTable( + name: "grouping", + comment: "废弃"); + + migrationBuilder.AlterTable( + name: "for_sex", + comment: "适用性别设置,固定编码", + oldComment: "可支持性别设置"); + + migrationBuilder.AlterTable( + name: "follow_up_type", + comment: "随访类别"); + + migrationBuilder.AlterTable( + name: "follow_up_plan", + comment: "随访计划"); + + migrationBuilder.AlterTable( + name: "follow_up_mode", + comment: "随访方式"); + + migrationBuilder.AlterTable( + name: "department", + comment: "部门,已经废弃", + oldComment: "部门"); + + migrationBuilder.AlterTable( + name: "customer_org_type", + comment: "客户单位类别", + oldComment: "团体类型设置"); + + migrationBuilder.AlterTable( + name: "contact_method", + comment: "联系方式新增量主键,更新映射关系", + oldComment: "联系方式"); + + migrationBuilder.AlterColumn( + name: "item_type_id", + table: "user_item_type", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "项目类别ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "value_option_name", + table: "sys_parm_value_option", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "可选项名", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "value_option", + table: "sys_parm_value_option", + type: "character varying(50)", + maxLength: 50, + nullable: false, + comment: "可选项", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "remark", + table: "sys_parm_value", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "备注", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "parm_value", + table: "sys_parm_value", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "参数值", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "organization_unit_id", + table: "sys_parm_value", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "单位ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "sys_parm_id", + table: "sys_parm_value", + type: "character varying(50)", + maxLength: 50, + nullable: false, + comment: "参数ID", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "parent_id", + table: "sys_parm_type", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "父ID", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "value_type", + table: "sys_parm", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "结果类别", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "sys_parm_type_id", + table: "sys_parm", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "参数类别ID", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "remark", + table: "sys_parm", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "备注", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "sys_parm", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "参数名", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "template_content", + table: "summary_template", + type: "character varying(200)", + maxLength: 200, + nullable: true, + comment: "模板内容", + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "summary_title", + table: "sum_summary_header", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "综述标题", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "summary_flag", + table: "sum_summary_header", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "综述标志", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "patient_register_id", + table: "sum_summary_header", + type: "uuid", + nullable: false, + comment: "病人登记ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "summary_content", + table: "sum_summary_content", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "建议内容", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "sum_summary_header_id", + table: "sum_summary_content", + type: "uuid", + nullable: false, + comment: "建议头ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "suggestion_title", + table: "sum_suggestion_header", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "建议标题", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "suggestion_flag", + table: "sum_suggestion_header", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "建议标志", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "patient_register_id", + table: "sum_suggestion_header", + type: "uuid", + nullable: false, + comment: "病人登记ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "sum_suggestion_header_id", + table: "sum_diagnosis", + type: "uuid", + nullable: false, + comment: "建议头ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "diagnosis_id", + table: "sum_diagnosis", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "诊断ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "patient_register_id", + table: "sum_diagnosis", + type: "uuid", + nullable: false, + comment: "病人登记ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "suggestion_content", + table: "suggestion", + type: "character varying(200)", + maxLength: 200, + nullable: true, + comment: "建议内容", + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "diagnosis_id", + table: "suggestion", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "诊断ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "sms_type_id", + table: "sms_template", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "短信类别ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "content", + table: "sms_template", + type: "character varying(200)", + maxLength: 200, + nullable: true, + comment: "短信内容", + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "sms_type_id", + table: "sms_send", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "短信类别ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "patient_name", + table: "sms_send", + type: "character varying(16)", + maxLength: 16, + nullable: true, + comment: "姓名", + oldClrType: typeof(string), + oldType: "character varying(16)", + oldMaxLength: 16, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "patient_id", + table: "sms_send", + type: "uuid", + nullable: true, + comment: "人员ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "mobile_telephone", + table: "sms_send", + type: "character varying(11)", + maxLength: 11, + nullable: true, + comment: "手机号", + oldClrType: typeof(string), + oldType: "character varying(11)", + oldMaxLength: 11, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "is_complete", + table: "sms_send", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是完成", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "follow_up_plan_id", + table: "sms_send", + type: "uuid", + nullable: true, + comment: "随访计划ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "content", + table: "sms_send", + type: "character varying(200)", + maxLength: 200, + nullable: true, + comment: "短信内容", + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "upper_diagnosis_id", + table: "sex_hormone_reference_range", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "上限诊断", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "sex_hormone_term_id", + table: "sex_hormone_reference_range", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "性激素期限ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "reference_range_value", + table: "sex_hormone_reference_range", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "参考范围", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "lower_diagnosis_id", + table: "sex_hormone_reference_range", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "下限诊断", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "item_id", + table: "sex_hormone_reference_range", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "项目编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "critical_range_value", + table: "sex_hormone_reference_range", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "危急值参考范围", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "age_upper_limit", + table: "sex_hormone_reference_range", + type: "smallint", + nullable: false, + defaultValueSql: "200", + comment: "年龄上限", + oldClrType: typeof(short), + oldType: "smallint", + oldDefaultValueSql: "200"); + + migrationBuilder.AlterColumn( + name: "age_lower_limit", + table: "sex_hormone_reference_range", + type: "smallint", + nullable: false, + comment: "年龄下限", + oldClrType: typeof(short), + oldType: "smallint"); + + migrationBuilder.AlterColumn( + name: "is_complete", + table: "settle_account", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是完成", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "completed_time", + table: "settle_account", + type: "timestamp without time zone", + nullable: true, + comment: "结账时间", + oldClrType: typeof(DateTime), + oldType: "timestamp without time zone", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "completed_by", + table: "settle_account", + type: "character varying(16)", + maxLength: 16, + nullable: true, + comment: "结账人", + oldClrType: typeof(string), + oldType: "character varying(16)", + oldMaxLength: 16, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "valid_period_unit", + table: "service_trades", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "有效期单位", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "valid_period_display_name", + table: "service_trades", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "有效期名", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "asbitem_id", + table: "sample_group_detail", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "组合项目编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "sample_type_id", + table: "sample_group", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "标本类型ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "sample_container_id", + table: "sample_group", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "标本容器ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "container_color_name", + table: "sample_container", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "颜色名", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "container_color", + table: "sample_container", + type: "integer", + nullable: false, + comment: "颜色", + oldClrType: typeof(int), + oldType: "integer"); + + migrationBuilder.AlterColumn( + name: "item_type_id", + table: "room", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "项目类别编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "department_id", + table: "room", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "report_prompt", + table: "result_status", + type: "character varying(8)", + maxLength: 8, + nullable: true, + comment: "报告单提示", + oldClrType: typeof(string), + oldType: "character varying(8)", + oldMaxLength: 8, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "report_font_color", + table: "result_status", + type: "integer", + nullable: false, + comment: "报告单字体颜色", + oldClrType: typeof(int), + oldType: "integer"); + + migrationBuilder.AlterColumn( + name: "report_background_color", + table: "result_status", + type: "integer", + nullable: false, + defaultValueSql: "16777215", + comment: "报告单背景颜色", + oldClrType: typeof(int), + oldType: "integer", + oldDefaultValueSql: "16777215"); + + migrationBuilder.AlterColumn( + name: "data_input_prompt", + table: "result_status", + type: "character varying(8)", + maxLength: 8, + nullable: true, + comment: "数据录入提示", + oldClrType: typeof(string), + oldType: "character varying(8)", + oldMaxLength: 8, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "data_input_font_color", + table: "result_status", + type: "integer", + nullable: false, + comment: "数据录入字体颜色", + oldClrType: typeof(int), + oldType: "integer"); + + migrationBuilder.AlterColumn( + name: "data_input_background_color", + table: "result_status", + type: "integer", + nullable: false, + defaultValueSql: "16777215", + comment: "数据录入报告单颜色", + oldClrType: typeof(int), + oldType: "integer", + oldDefaultValueSql: "16777215"); + + migrationBuilder.AlterColumn( + name: "summary_flag", + table: "register_check_summary", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "综述标志", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "summary", + table: "register_check_summary", + type: "character varying(500)", + maxLength: 500, + nullable: true, + comment: "综述", + oldClrType: typeof(string), + oldType: "character varying(500)", + oldMaxLength: 500, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "register_check_id", + table: "register_check_summary", + type: "uuid", + nullable: false, + comment: "登记检查ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "display_order", + table: "register_check_summary", + type: "integer", + nullable: false, + comment: "顺序", + oldClrType: typeof(int), + oldType: "integer"); + + migrationBuilder.AlterColumn( + name: "suggestion", + table: "register_check_suggestion", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "建议", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "register_check_id", + table: "register_check_suggestion", + type: "uuid", + nullable: false, + comment: "登记检查ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "display_order", + table: "register_check_suggestion", + type: "integer", + nullable: false, + comment: "显示顺序", + oldClrType: typeof(int), + oldType: "integer"); + + migrationBuilder.AlterColumn( + name: "unit", + table: "register_check_item", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "单位", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "critical_value", + table: "register_check_item", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "危急值", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "critical_range_value", + table: "register_check_item", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "危急值范围", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "item_id", + table: "register_check_item", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "项目编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "项目"); + + migrationBuilder.AlterColumn( + name: "register_check_id", + table: "register_check_critical_value", + type: "uuid", + nullable: false, + comment: "登记检查ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "process_type_flag", + table: "register_check_critical_value", + type: "character(1)", + maxLength: 1, + nullable: true, + comment: "处理类别标志", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "item_id", + table: "register_check_critical_value", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "项目编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "is_complete", + table: "register_check_critical_value", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是否完成", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "doctor", + table: "register_check_critical_value", + type: "character varying(16)", + maxLength: 16, + nullable: true, + comment: "处理医生", + oldClrType: typeof(string), + oldType: "character varying(16)", + oldMaxLength: 16, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "critical_value", + table: "register_check_critical_value", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "危急值", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "third_info", + table: "register_check", + type: "character varying(80)", + maxLength: 80, + nullable: true, + comment: "第三方信息", + oldClrType: typeof(string), + oldType: "character varying(80)", + oldMaxLength: 80, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "is_lock", + table: "register_check", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是否锁住", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_audit", + table: "register_check", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是审核", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "critical_value_process_flag", + table: "register_check", + type: "character(1)", + maxLength: 1, + nullable: true, + comment: "危急值处理标志", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "critical_value_process_doctor", + table: "register_check", + type: "character varying(16)", + maxLength: 16, + nullable: true, + comment: "危急值处理医生", + oldClrType: typeof(string), + oldType: "character varying(16)", + oldMaxLength: 16, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "critical_value_process_date", + table: "register_check", + type: "date", + nullable: true, + comment: "危急值处理日期", + oldClrType: typeof(DateOnly), + oldType: "date", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "critical_value_process_content", + table: "register_check", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "危急值处理内容", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "critical_value_flag", + table: "register_check", + type: "character(1)", + maxLength: 1, + nullable: true, + defaultValueSql: "0", + comment: "危急值标志", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldNullable: true, + oldDefaultValueSql: "0"); + + migrationBuilder.AlterColumn( + name: "critical_value_create_date", + table: "register_check", + type: "date", + nullable: true, + comment: "危急值创建日期", + oldClrType: typeof(DateOnly), + oldType: "date", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "critical_value", + table: "register_check", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "危急值", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "complete_flag", + table: "register_check", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "0", + comment: "完成标志", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "0"); + + migrationBuilder.AlterColumn( + name: "check_request_print_times", + table: "register_check", + type: "smallint", + nullable: false, + comment: "检查申请单打印次数", + oldClrType: typeof(short), + oldType: "smallint"); + + migrationBuilder.AlterColumn( + name: "check_request_no", + table: "register_check", + type: "uuid", + maxLength: 20, + nullable: false, + comment: "检查单号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldMaxLength: 20); + + migrationBuilder.AlterColumn( + name: "check_doctor_id", + table: "register_check", + type: "uuid", + nullable: false, + comment: "检查医生ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "check_date", + table: "register_check", + type: "date", + nullable: true, + comment: "检查日期", + oldClrType: typeof(DateOnly), + oldType: "date", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "auditor_user_id", + table: "register_check", + type: "uuid", + nullable: true, + comment: "审核医生ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "audit_time", + table: "register_check", + type: "timestamp without time zone", + nullable: true, + comment: "审核时间", + oldClrType: typeof(DateTime), + oldType: "timestamp without time zone", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "register_asbitem_id", + table: "register_asbitem", + type: "uuid", + nullable: true, + comment: "主键", + oldClrType: typeof(Guid), + oldType: "uuid", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "lis_request_id", + table: "register_asbitem", + type: "uuid", + maxLength: 20, + nullable: false, + comment: "LIS申请ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldMaxLength: 20); + + migrationBuilder.AlterColumn( + name: "amount", + table: "register_asbitem", + type: "smallint", + nullable: true, + comment: "数量", + oldClrType: typeof(short), + oldType: "smallint", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "register_check_id", + table: "register_asbitem", + type: "uuid", + nullable: false, + comment: "检查单ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "reference_range_value", + table: "reference_range", + type: "character varying(150)", + maxLength: 150, + nullable: true, + comment: "参考范围值数字型保存区间字符型保存文本值", + oldClrType: typeof(string), + oldType: "character varying(150)", + oldMaxLength: 150, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "reference_range_type_flag", + table: "reference_range", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "参考范围类别0-无参考范围,1-数字型,2-字符型,3-性激素", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "critical_range_value", + table: "reference_range", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "危急值", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "room_id", + table: "queue_register", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "房间ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "patient_register_id", + table: "queue_register", + type: "uuid", + nullable: false, + comment: "病人登记ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "no_complete_reason", + table: "queue_register", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "0", + comment: "未完成原因", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "0"); + + migrationBuilder.AlterColumn( + name: "display_order", + table: "queue_register", + type: "integer", + nullable: false, + comment: "排队顺序", + oldClrType: typeof(int), + oldType: "integer"); + + migrationBuilder.AlterColumn( + name: "complete_flag", + table: "queue_register", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "0", + comment: "完成标志", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "0"); + + migrationBuilder.AlterColumn( + name: "call_time", + table: "queue_register", + type: "timestamp without time zone", + nullable: true, + comment: "叫号时间", + oldClrType: typeof(DateTime), + oldType: "timestamp without time zone", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "price_item_code", + table: "price_item", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "价表编码", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "price", + table: "price_item", + type: "numeric(10,2)", + precision: 10, + scale: 2, + nullable: false, + comment: "价格", + oldClrType: typeof(decimal), + oldType: "numeric(10,2)", + oldPrecision: 10, + oldScale: 2); + + migrationBuilder.AlterColumn( + name: "invoice_item_type_id", + table: "price_item", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "发票项目类别ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "price_item", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "reply_content", + table: "phone_follow", + type: "character varying(200)", + maxLength: 200, + nullable: true, + comment: "回复内容", + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "patient_register_id", + table: "phone_follow", + type: "uuid", + nullable: false, + comment: "病人登记ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "follow_up_plan_id", + table: "phone_follow", + type: "uuid", + nullable: true, + comment: "随访计划ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "follow_content", + table: "phone_follow", + type: "character varying(200)", + maxLength: 200, + nullable: true, + comment: "随访内容", + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "id", + table: "pay_mode", + type: "character(4)", + fixedLength: true, + maxLength: 4, + nullable: false, + comment: "编号,固定编码", + oldClrType: typeof(string), + oldType: "character(4)", + oldFixedLength: true, + oldMaxLength: 4); + + migrationBuilder.AlterColumn( + name: "telephone", + table: "patient", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "电话", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "sex_id", + table: "patient", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "性别", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "postal_code", + table: "patient", + type: "character varying(10)", + maxLength: 10, + nullable: true, + comment: "邮政编码", + oldClrType: typeof(string), + oldType: "character varying(10)", + oldMaxLength: 10, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "patient_password", + table: "patient", + type: "character varying(10)", + maxLength: 10, + nullable: true, + comment: "登录密码", + oldClrType: typeof(string), + oldType: "character varying(10)", + oldMaxLength: 10, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "nation_id", + table: "patient", + type: "uuid", + fixedLength: true, + nullable: true, + comment: "民族编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "mobile_telephone", + table: "patient", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "手机号", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "marital_status_id", + table: "patient", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "婚姻状况", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "id_no", + table: "patient", + type: "character varying(18)", + maxLength: 18, + nullable: true, + comment: "身份证号", + oldClrType: typeof(string), + oldType: "character varying(18)", + oldMaxLength: 18, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "email", + table: "patient", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "email", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "patient", + type: "character varying(30)", + maxLength: 30, + nullable: true, + comment: "姓名", + oldClrType: typeof(string), + oldType: "character varying(30)", + oldMaxLength: 30, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "birth_place_id", + table: "patient", + type: "uuid", + fixedLength: true, + nullable: true, + comment: "出生地", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "birth_date", + table: "patient", + type: "date", + nullable: true, + comment: "出生日期", + oldClrType: typeof(DateOnly), + oldType: "date", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "address", + table: "patient", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "地址", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "organization_unit_id", + table: "organization_units_customer_org", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "体检中心编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "customer_org_id", + table: "organization_units_customer_org", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "客户单位编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "medical_report_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "asbitem_id", + table: "medical_package_detail", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "组合项目编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "sign_in_time", + table: "lis_request", + type: "date", + nullable: true, + comment: "签收时间", + oldClrType: typeof(DateOnly), + oldType: "date", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "sign_in_person", + table: "lis_request", + type: "character varying(16)", + maxLength: 16, + nullable: true, + comment: "签收人姓名", + oldClrType: typeof(string), + oldType: "character varying(16)", + oldMaxLength: 16, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "sign_in_order", + table: "lis_request", + type: "integer", + nullable: true, + comment: "签收顺序", + oldClrType: typeof(int), + oldType: "integer", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "sampling_time", + table: "lis_request", + type: "date", + nullable: true, + comment: "采样时间", + oldClrType: typeof(DateOnly), + oldType: "date", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "sampler", + table: "lis_request", + type: "character varying(16)", + maxLength: 16, + nullable: true, + comment: "采样人姓名", + oldClrType: typeof(string), + oldType: "character varying(16)", + oldMaxLength: 16, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "sample_type_id", + table: "lis_request", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "标本类型", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "sample_container_id", + table: "lis_request", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "标本容器编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "patient_register_id", + table: "lis_request", + type: "uuid", + nullable: false, + comment: "病人登记ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "lis_request_no", + table: "lis_request", + type: "uuid", + nullable: false, + comment: "检验申请单号", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "is_sign_in", + table: "lis_request", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是签收", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_print", + table: "lis_request", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是否已打印", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "simple_code", + table: "item_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "自定义简码", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "path_code", + table: "item_type", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "路径编码", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "parent_id", + table: "item_type", + type: "uuid", + fixedLength: true, + nullable: true, + comment: "父id", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "medical_report_type_id", + table: "item_type", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "体检报告类别", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "is_merge_asbitem", + table: "item_type", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "合并组合项目,Y-是,N-否", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "guid_type_id", + table: "item_type", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "指引类别", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "item_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "check_type_flag", + table: "item_type", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "'G'::bpchar", + comment: "检查类别,0-普通检查,1-检验,2-影像检查", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "'G'::bpchar"); + + migrationBuilder.AlterColumn( + name: "item_id", + table: "item_template_detail", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "项目编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "item_default_result", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "unit_id", + table: "item", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "单位", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "result_template_type_flag", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "0", + comment: "结果模板类别标志", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "0"); + + migrationBuilder.AlterColumn( + name: "reference_range_type_flag", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "'E'::bpchar", + comment: "参考范围类别0-无参考范围,1-数字型,2-字符型,3-性激素", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "'E'::bpchar"); + + migrationBuilder.AlterColumn( + name: "price_item_id", + table: "item", + type: "uuid", + fixedLength: true, + maxLength: 8, + nullable: false, + comment: "价表项目编码", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldMaxLength: 8); + + migrationBuilder.AlterColumn( + name: "price", + table: "item", + type: "numeric(10,2)", + precision: 10, + scale: 2, + nullable: false, + comment: "价格", + oldClrType: typeof(decimal), + oldType: "numeric(10,2)", + oldPrecision: 10, + oldScale: 2); + + migrationBuilder.AlterColumn( + name: "item_type_id", + table: "item", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "项目类别", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "is_produce_summary", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是生成小结", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_name_into_summary", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "名称进入小结", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_diagnosis_function", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "启用诊断函数", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_continue_process", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是继续处理", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_calculation_item", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是计算项目", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_active", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "启用", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "input_check", + table: "item", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "输入结果校验公式", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "english_short_name", + table: "item", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "英文缩写", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "item", + type: "character varying(30)", + maxLength: 30, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(30)", + oldMaxLength: 30, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "diagnosis_function", + table: "item", + type: "character varying(2000)", + maxLength: 2000, + nullable: true, + comment: "诊断函数", + oldClrType: typeof(string), + oldType: "character varying(2000)", + oldMaxLength: 2000, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "default_result", + table: "item", + type: "character varying(200)", + maxLength: 200, + nullable: true, + comment: "默认结果", + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "calculation_function", + table: "item", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "计算函数", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "invoice_org", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "invoice_item_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "patient_register_no", + table: "import_pacs_result", + type: "character varying(12)", + maxLength: 12, + nullable: true, + comment: "人员登记号", + oldClrType: typeof(string), + oldType: "character varying(12)", + oldMaxLength: 12, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "is_print", + table: "import_pacs_picture", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是否打印", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "检查所见"); + + migrationBuilder.AlterColumn( + name: "check_request_no", + table: "import_pacs_picture", + type: "uuid", + nullable: false, + comment: "检查申请单号", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "guide_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "follow_up_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "remark", + table: "follow_up_plan", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "备注", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "perfom_user_id", + table: "follow_up_plan", + type: "uuid", + nullable: false, + comment: "执行者用户ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "perfom_time", + table: "follow_up_plan", + type: "timestamp without time zone", + nullable: true, + comment: "执行时间", + oldClrType: typeof(DateTime), + oldType: "timestamp without time zone", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "perfom_flag", + table: "follow_up_plan", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "执行标志", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_loop", + table: "follow_up_plan", + type: "character(1)", + maxLength: 1, + nullable: true, + comment: "是否循环", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "follow_up_type_id", + table: "follow_up_plan", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "随访类别", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "follow_up_mode_id", + table: "follow_up_plan", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "随访方式", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "doctor_user_id", + table: "follow_up_plan", + type: "uuid", + nullable: false, + comment: "医生", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "cycle_days", + table: "follow_up_plan", + type: "smallint", + nullable: false, + comment: "周期天数", + oldClrType: typeof(short), + oldType: "smallint"); + + migrationBuilder.AlterColumn( + name: "content", + table: "follow_up_plan", + type: "character varying(200)", + maxLength: 200, + nullable: true, + comment: "随访内容", + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "follow_up_mode", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "path_code", + table: "diagnosis_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "路径编码", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "parent_id", + table: "diagnosis_type", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "父编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "diagnosis_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "diagnosis_id", + table: "diagnosis_template_detail", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "诊断编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "diagnosis_template_id", + table: "diagnosis_template_detail", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "诊断模板编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "diagnosis_template", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "diagnosis_postfix", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "suggestion_name", + table: "diagnosis", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "建议名称", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "item_type_id", + table: "diagnosis", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "项目类别", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "is_summary_template", + table: "diagnosis", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是总检模板", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_ill", + table: "diagnosis", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是疾病", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "for_sex_id", + table: "diagnosis", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "'A'::bpchar", + comment: "适用性别", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "'A'::bpchar"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "diagnosis", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "diagnosis_level_id", + table: "diagnosis", + type: "uuid", + nullable: false, + comment: "诊断级别", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "customer_org_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "register_no", + table: "customer_org_register", + type: "character varying(12)", + maxLength: 12, + nullable: true, + comment: "计划号", + oldClrType: typeof(string), + oldType: "character varying(12)", + oldMaxLength: 12, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "register_name", + table: "customer_org_register", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "计划名称", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "price", + table: "customer_org_group_detail", + type: "numeric(10,2)", + precision: 10, + scale: 2, + nullable: false, + comment: "价格", + oldClrType: typeof(decimal), + oldType: "numeric(10,2)", + oldPrecision: 10, + oldScale: 2); + + migrationBuilder.AlterColumn( + name: "asbitem_id", + table: "customer_org_group_detail", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "组合项目编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "customer_org_group_id", + table: "customer_org_group_detail", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "分组编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "pay_mode_id", + table: "customer_org_charge_pay", + type: "character(4)", + fixedLength: true, + maxLength: 4, + nullable: true, + comment: "支付方式", + oldClrType: typeof(string), + oldType: "character(4)", + oldFixedLength: true, + oldMaxLength: 4, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "charge_money", + table: "customer_org_charge_pay", + type: "numeric(10,2)", + precision: 10, + scale: 2, + nullable: false, + comment: "支付金额", + oldClrType: typeof(decimal), + oldType: "numeric(10,2)", + oldPrecision: 10, + oldScale: 2); + + migrationBuilder.AlterColumn( + name: "back_moeny", + table: "customer_org_charge_back_pay", + type: "numeric(10,2)", + precision: 10, + scale: 2, + nullable: false, + comment: "退费金额", + oldClrType: typeof(decimal), + oldType: "numeric(10,2)", + oldPrecision: 10, + oldScale: 2); + + migrationBuilder.AlterColumn( + name: "pay_mode_id", + table: "customer_org_charge_back_pay", + type: "character(4)", + fixedLength: true, + maxLength: 4, + nullable: false, + comment: "支付方式", + oldClrType: typeof(string), + oldType: "character(4)", + oldFixedLength: true, + oldMaxLength: 4); + + migrationBuilder.AlterColumn( + name: "settle_account_id", + table: "customer_org_charge_back", + type: "uuid", + nullable: true, + comment: "结算账户ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "customer_org_charge_id", + table: "customer_org_charge_back", + type: "uuid", + nullable: false, + comment: "收费编号", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "settle_account_id", + table: "customer_org_charge", + type: "uuid", + nullable: false, + comment: "结算账户ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "payer", + table: "customer_org_charge", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "付款人", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "customer_org_register_id", + table: "customer_org_charge", + type: "uuid", + nullable: false, + comment: "客户单位登记ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "charge_flag", + table: "customer_org_charge", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "收退费标志", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "status_flag", + table: "customer_org", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "0", + comment: "状态", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "0"); + + migrationBuilder.AlterColumn( + name: "short_name", + table: "customer_org", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "简称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "path_code", + table: "customer_org", + type: "character varying(60)", + maxLength: 60, + nullable: true, + comment: "路径编码", + oldClrType: typeof(string), + oldType: "character varying(60)", + oldMaxLength: 60, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "parent_id", + table: "customer_org", + type: "uuid", + fixedLength: true, + nullable: true, + comment: "父编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "is_lock", + table: "customer_org", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "锁住", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "invoice_name", + table: "customer_org", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "开票名称", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "path_code", + table: "critical_value_type", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "路径编码", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "parent_id", + table: "critical_value_type", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "父编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "critical_value_type", + type: "character varying(40)", + maxLength: 40, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(40)", + oldMaxLength: 40, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "critical_value", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "critical_value_type_id", + table: "critical_value", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "危急值类别编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "title", + table: "contact_person", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "职务", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "remark", + table: "contact_person", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "备注", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "contact_person", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "姓名", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "customer_org_id", + table: "contact_person", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "客户单位编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "contact_method_value", + table: "contact_method", + type: "character varying(15)", + maxLength: 15, + nullable: true, + comment: "联系方式,比如18911254911,839860190@qq.com", + oldClrType: typeof(string), + oldType: "character varying(15)", + oldMaxLength: 15, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "contact_method_type", + table: "contact_method", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "'M'::bpchar", + comment: "联系方式类别-比如0-手机、1-电子邮箱", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "'M'::bpchar"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "common_char_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "common_char", + type: "character varying(1)", + maxLength: 1, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(1)", + oldMaxLength: 1, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "common_char_type_id", + table: "common_char", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "常用字符类别编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "back_moeny", + table: "charge_back_pay", + type: "numeric(10,2)", + precision: 10, + scale: 2, + nullable: false, + comment: "退费金额", + oldClrType: typeof(decimal), + oldType: "numeric(10,2)", + oldPrecision: 10, + oldScale: 2); + + migrationBuilder.AlterColumn( + name: "pay_mode_id", + table: "charge_back_pay", + type: "character(4)", + fixedLength: true, + maxLength: 4, + nullable: false, + comment: "支付方式ID", + oldClrType: typeof(string), + oldType: "character(4)", + oldFixedLength: true, + oldMaxLength: 4); + + migrationBuilder.AlterColumn( + name: "settle_account_id", + table: "charge_back", + type: "uuid", + nullable: false, + comment: "结账ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "settle_account_id", + table: "charge", + type: "uuid", + nullable: false, + comment: "结账ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "country_code", + table: "birth_place", + type: "character varying(6)", + maxLength: 6, + nullable: true, + comment: "国家标准码", + oldClrType: typeof(string), + oldType: "character varying(6)", + oldMaxLength: 6, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "path_code", + table: "bigtext_result_type", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "路径编码", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "parent_id", + table: "bigtext_result_type", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "父编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "item_type_id", + table: "bigtext_result_type", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "项目类别", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "bigtext_result_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "bigtext_result_template", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "bigtext_result_type_id", + table: "bigtext_result_template", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "结果类别编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "description", + table: "bigtext_result_description", + type: "character varying(200)", + maxLength: 200, + nullable: true, + comment: "描述", + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "conclusion", + table: "bigtext_result_conclusion", + type: "character varying(200)", + maxLength: 200, + nullable: true, + comment: "结论", + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "price_item_id", + table: "asbitem_price_item", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "价表项目编码", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "asbitem_id", + table: "asbitem_price_item", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "组合项目编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "amount", + table: "asbitem_price_item", + type: "smallint", + nullable: true, + comment: "数量", + oldClrType: typeof(short), + oldType: "smallint", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "guide", + table: "asbitem_guide", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "指引单内容", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "for_sex_id", + table: "asbitem_guide", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "适用性别ID", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "asbitem_id", + table: "asbitem_guide", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "组合项目ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "organization_unit_id", + table: "asbitem_guide", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "单位科室ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "item_id", + table: "asbitem_detail", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "项目编码", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterTable( + name: "users", + oldComment: "用户表,废弃"); + + migrationBuilder.AlterTable( + name: "user_rights", + oldComment: "用户控件权限-废弃"); + + migrationBuilder.AlterTable( + name: "user_grouping", + oldComment: "用户组权限-废弃"); + + migrationBuilder.AlterTable( + name: "user_department", + comment: "用户科室操作权限", + oldComment: "用户科室操作权限,废弃"); + + migrationBuilder.AlterTable( + name: "sysdiagrams", + oldComment: "不是本软件的表,估计是系统自动生成的"); + + migrationBuilder.AlterTable( + name: "sms_type", + oldComment: "短信类别"); + + migrationBuilder.AlterTable( + name: "sms_template", + oldComment: "短信模板"); + + migrationBuilder.AlterTable( + name: "sms_send", + oldComment: "短信发送"); + + migrationBuilder.AlterTable( + name: "primarykey_builder", + comment: "主键产生器", + oldComment: "主键产生器,废弃"); + + migrationBuilder.AlterTable( + name: "patient_symptom", + oldComment: "职业病-体检病人症状"); + + migrationBuilder.AlterTable( + name: "operate_log", + comment: "操作日志", + oldComment: "作日志,已经废弃"); + + migrationBuilder.AlterTable( + name: "grouping", + oldComment: "废弃"); + + migrationBuilder.AlterTable( + name: "for_sex", + comment: "可支持性别设置", + oldComment: "适用性别设置,固定编码"); + + migrationBuilder.AlterTable( + name: "follow_up_type", + oldComment: "随访类别"); + + migrationBuilder.AlterTable( + name: "follow_up_plan", + oldComment: "随访计划"); + + migrationBuilder.AlterTable( + name: "follow_up_mode", + oldComment: "随访方式"); + + migrationBuilder.AlterTable( + name: "department", + comment: "部门", + oldComment: "部门,已经废弃"); + + migrationBuilder.AlterTable( + name: "customer_org_type", + comment: "团体类型设置", + oldComment: "客户单位类别"); + + migrationBuilder.AlterTable( + name: "contact_method", + comment: "联系方式", + oldComment: "联系方式新增量主键,更新映射关系"); + + migrationBuilder.AlterColumn( + name: "item_type_id", + table: "user_item_type", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "项目类别ID"); + + migrationBuilder.AlterColumn( + name: "value_option_name", + table: "sys_parm_value_option", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "可选项名"); + + migrationBuilder.AlterColumn( + name: "value_option", + table: "sys_parm_value_option", + type: "character varying(50)", + maxLength: 50, + nullable: false, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldComment: "可选项"); + + migrationBuilder.AlterColumn( + name: "remark", + table: "sys_parm_value", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "备注"); + + migrationBuilder.AlterColumn( + name: "parm_value", + table: "sys_parm_value", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "参数值"); + + migrationBuilder.AlterColumn( + name: "organization_unit_id", + table: "sys_parm_value", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "单位ID"); + + migrationBuilder.AlterColumn( + name: "sys_parm_id", + table: "sys_parm_value", + type: "character varying(50)", + maxLength: 50, + nullable: false, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldComment: "参数ID"); + + migrationBuilder.AlterColumn( + name: "parent_id", + table: "sys_parm_type", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "父ID"); + + migrationBuilder.AlterColumn( + name: "value_type", + table: "sys_parm", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "结果类别"); + + migrationBuilder.AlterColumn( + name: "sys_parm_type_id", + table: "sys_parm", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "参数类别ID"); + + migrationBuilder.AlterColumn( + name: "remark", + table: "sys_parm", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "备注"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "sys_parm", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "参数名"); + + migrationBuilder.AlterColumn( + name: "template_content", + table: "summary_template", + type: "character varying(200)", + maxLength: 200, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true, + oldComment: "模板内容"); + + migrationBuilder.AlterColumn( + name: "summary_title", + table: "sum_summary_header", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "综述标题"); + + migrationBuilder.AlterColumn( + name: "summary_flag", + table: "sum_summary_header", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "综述标志"); + + migrationBuilder.AlterColumn( + name: "patient_register_id", + table: "sum_summary_header", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "病人登记ID"); + + migrationBuilder.AlterColumn( + name: "summary_content", + table: "sum_summary_content", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "建议内容"); + + migrationBuilder.AlterColumn( + name: "sum_summary_header_id", + table: "sum_summary_content", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "建议头ID"); + + migrationBuilder.AlterColumn( + name: "suggestion_title", + table: "sum_suggestion_header", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "建议标题"); + + migrationBuilder.AlterColumn( + name: "suggestion_flag", + table: "sum_suggestion_header", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "建议标志"); + + migrationBuilder.AlterColumn( + name: "patient_register_id", + table: "sum_suggestion_header", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "病人登记ID"); + + migrationBuilder.AlterColumn( + name: "sum_suggestion_header_id", + table: "sum_diagnosis", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "建议头ID"); + + migrationBuilder.AlterColumn( + name: "diagnosis_id", + table: "sum_diagnosis", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "诊断ID"); + + migrationBuilder.AlterColumn( + name: "patient_register_id", + table: "sum_diagnosis", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "病人登记ID"); + + migrationBuilder.AlterColumn( + name: "suggestion_content", + table: "suggestion", + type: "character varying(200)", + maxLength: 200, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true, + oldComment: "建议内容"); + + migrationBuilder.AlterColumn( + name: "diagnosis_id", + table: "suggestion", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "诊断ID"); + + migrationBuilder.AlterColumn( + name: "sms_type_id", + table: "sms_template", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "短信类别ID"); + + migrationBuilder.AlterColumn( + name: "content", + table: "sms_template", + type: "character varying(200)", + maxLength: 200, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true, + oldComment: "短信内容"); + + migrationBuilder.AlterColumn( + name: "sms_type_id", + table: "sms_send", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "短信类别ID"); + + migrationBuilder.AlterColumn( + name: "patient_name", + table: "sms_send", + type: "character varying(16)", + maxLength: 16, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(16)", + oldMaxLength: 16, + oldNullable: true, + oldComment: "姓名"); + + migrationBuilder.AlterColumn( + name: "patient_id", + table: "sms_send", + type: "uuid", + nullable: true, + oldClrType: typeof(Guid), + oldType: "uuid", + oldNullable: true, + oldComment: "人员ID"); + + migrationBuilder.AlterColumn( + name: "mobile_telephone", + table: "sms_send", + type: "character varying(11)", + maxLength: 11, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(11)", + oldMaxLength: 11, + oldNullable: true, + oldComment: "手机号"); + + migrationBuilder.AlterColumn( + name: "is_complete", + table: "sms_send", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是完成"); + + migrationBuilder.AlterColumn( + name: "follow_up_plan_id", + table: "sms_send", + type: "uuid", + nullable: true, + oldClrType: typeof(Guid), + oldType: "uuid", + oldNullable: true, + oldComment: "随访计划ID"); + + migrationBuilder.AlterColumn( + name: "content", + table: "sms_send", + type: "character varying(200)", + maxLength: 200, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true, + oldComment: "短信内容"); + + migrationBuilder.AlterColumn( + name: "upper_diagnosis_id", + table: "sex_hormone_reference_range", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "上限诊断"); + + migrationBuilder.AlterColumn( + name: "sex_hormone_term_id", + table: "sex_hormone_reference_range", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "性激素期限ID"); + + migrationBuilder.AlterColumn( + name: "reference_range_value", + table: "sex_hormone_reference_range", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "参考范围"); + + migrationBuilder.AlterColumn( + name: "lower_diagnosis_id", + table: "sex_hormone_reference_range", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "下限诊断"); + + migrationBuilder.AlterColumn( + name: "item_id", + table: "sex_hormone_reference_range", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "项目编号"); + + migrationBuilder.AlterColumn( + name: "critical_range_value", + table: "sex_hormone_reference_range", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "危急值参考范围"); + + migrationBuilder.AlterColumn( + name: "age_upper_limit", + table: "sex_hormone_reference_range", + type: "smallint", + nullable: false, + defaultValueSql: "200", + oldClrType: typeof(short), + oldType: "smallint", + oldDefaultValueSql: "200", + oldComment: "年龄上限"); + + migrationBuilder.AlterColumn( + name: "age_lower_limit", + table: "sex_hormone_reference_range", + type: "smallint", + nullable: false, + oldClrType: typeof(short), + oldType: "smallint", + oldComment: "年龄下限"); + + migrationBuilder.AlterColumn( + name: "is_complete", + table: "settle_account", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是完成"); + + migrationBuilder.AlterColumn( + name: "completed_time", + table: "settle_account", + type: "timestamp without time zone", + nullable: true, + oldClrType: typeof(DateTime), + oldType: "timestamp without time zone", + oldNullable: true, + oldComment: "结账时间"); + + migrationBuilder.AlterColumn( + name: "completed_by", + table: "settle_account", + type: "character varying(16)", + maxLength: 16, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(16)", + oldMaxLength: 16, + oldNullable: true, + oldComment: "结账人"); + + migrationBuilder.AlterColumn( + name: "valid_period_unit", + table: "service_trades", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "有效期单位"); + + migrationBuilder.AlterColumn( + name: "valid_period_display_name", + table: "service_trades", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "有效期名"); + + migrationBuilder.AlterColumn( + name: "asbitem_id", + table: "sample_group_detail", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "组合项目编号"); + + migrationBuilder.AlterColumn( + name: "sample_type_id", + table: "sample_group", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "标本类型ID"); + + migrationBuilder.AlterColumn( + name: "sample_container_id", + table: "sample_group", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "标本容器ID"); + + migrationBuilder.AlterColumn( + name: "container_color_name", + table: "sample_container", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "颜色名"); + + migrationBuilder.AlterColumn( + name: "container_color", + table: "sample_container", + type: "integer", + nullable: false, + oldClrType: typeof(int), + oldType: "integer", + oldComment: "颜色"); + + migrationBuilder.AlterColumn( + name: "item_type_id", + table: "room", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "项目类别编号"); + + migrationBuilder.AlterColumn( + name: "department_id", + table: "room", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: ""); + + migrationBuilder.AlterColumn( + name: "report_prompt", + table: "result_status", + type: "character varying(8)", + maxLength: 8, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(8)", + oldMaxLength: 8, + oldNullable: true, + oldComment: "报告单提示"); + + migrationBuilder.AlterColumn( + name: "report_font_color", + table: "result_status", + type: "integer", + nullable: false, + oldClrType: typeof(int), + oldType: "integer", + oldComment: "报告单字体颜色"); + + migrationBuilder.AlterColumn( + name: "report_background_color", + table: "result_status", + type: "integer", + nullable: false, + defaultValueSql: "16777215", + oldClrType: typeof(int), + oldType: "integer", + oldDefaultValueSql: "16777215", + oldComment: "报告单背景颜色"); + + migrationBuilder.AlterColumn( + name: "data_input_prompt", + table: "result_status", + type: "character varying(8)", + maxLength: 8, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(8)", + oldMaxLength: 8, + oldNullable: true, + oldComment: "数据录入提示"); + + migrationBuilder.AlterColumn( + name: "data_input_font_color", + table: "result_status", + type: "integer", + nullable: false, + oldClrType: typeof(int), + oldType: "integer", + oldComment: "数据录入字体颜色"); + + migrationBuilder.AlterColumn( + name: "data_input_background_color", + table: "result_status", + type: "integer", + nullable: false, + defaultValueSql: "16777215", + oldClrType: typeof(int), + oldType: "integer", + oldDefaultValueSql: "16777215", + oldComment: "数据录入报告单颜色"); + + migrationBuilder.AlterColumn( + name: "summary_flag", + table: "register_check_summary", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "综述标志"); + + migrationBuilder.AlterColumn( + name: "summary", + table: "register_check_summary", + type: "character varying(500)", + maxLength: 500, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(500)", + oldMaxLength: 500, + oldNullable: true, + oldComment: "综述"); + + migrationBuilder.AlterColumn( + name: "register_check_id", + table: "register_check_summary", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "登记检查ID"); + + migrationBuilder.AlterColumn( + name: "display_order", + table: "register_check_summary", + type: "integer", + nullable: false, + oldClrType: typeof(int), + oldType: "integer", + oldComment: "顺序"); + + migrationBuilder.AlterColumn( + name: "suggestion", + table: "register_check_suggestion", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "建议"); + + migrationBuilder.AlterColumn( + name: "register_check_id", + table: "register_check_suggestion", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "登记检查ID"); + + migrationBuilder.AlterColumn( + name: "display_order", + table: "register_check_suggestion", + type: "integer", + nullable: false, + oldClrType: typeof(int), + oldType: "integer", + oldComment: "显示顺序"); + + migrationBuilder.AlterColumn( + name: "unit", + table: "register_check_item", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "单位"); + + migrationBuilder.AlterColumn( + name: "critical_value", + table: "register_check_item", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "危急值"); + + migrationBuilder.AlterColumn( + name: "critical_range_value", + table: "register_check_item", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "危急值范围"); + + migrationBuilder.AlterColumn( + name: "item_id", + table: "register_check_item", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "项目", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "项目编号"); + + migrationBuilder.AlterColumn( + name: "register_check_id", + table: "register_check_critical_value", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "登记检查ID"); + + migrationBuilder.AlterColumn( + name: "process_type_flag", + table: "register_check_critical_value", + type: "character(1)", + maxLength: 1, + nullable: true, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldNullable: true, + oldComment: "处理类别标志"); + + migrationBuilder.AlterColumn( + name: "item_id", + table: "register_check_critical_value", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "项目编号"); + + migrationBuilder.AlterColumn( + name: "is_complete", + table: "register_check_critical_value", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是否完成"); + + migrationBuilder.AlterColumn( + name: "doctor", + table: "register_check_critical_value", + type: "character varying(16)", + maxLength: 16, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(16)", + oldMaxLength: 16, + oldNullable: true, + oldComment: "处理医生"); + + migrationBuilder.AlterColumn( + name: "critical_value", + table: "register_check_critical_value", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "危急值"); + + migrationBuilder.AlterColumn( + name: "third_info", + table: "register_check", + type: "character varying(80)", + maxLength: 80, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(80)", + oldMaxLength: 80, + oldNullable: true, + oldComment: "第三方信息"); + + migrationBuilder.AlterColumn( + name: "is_lock", + table: "register_check", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是否锁住"); + + migrationBuilder.AlterColumn( + name: "is_audit", + table: "register_check", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是审核"); + + migrationBuilder.AlterColumn( + name: "critical_value_process_flag", + table: "register_check", + type: "character(1)", + maxLength: 1, + nullable: true, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldNullable: true, + oldComment: "危急值处理标志"); + + migrationBuilder.AlterColumn( + name: "critical_value_process_doctor", + table: "register_check", + type: "character varying(16)", + maxLength: 16, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(16)", + oldMaxLength: 16, + oldNullable: true, + oldComment: "危急值处理医生"); + + migrationBuilder.AlterColumn( + name: "critical_value_process_date", + table: "register_check", + type: "date", + nullable: true, + oldClrType: typeof(DateOnly), + oldType: "date", + oldNullable: true, + oldComment: "危急值处理日期"); + + migrationBuilder.AlterColumn( + name: "critical_value_process_content", + table: "register_check", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "危急值处理内容"); + + migrationBuilder.AlterColumn( + name: "critical_value_flag", + table: "register_check", + type: "character(1)", + maxLength: 1, + nullable: true, + defaultValueSql: "0", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldNullable: true, + oldDefaultValueSql: "0", + oldComment: "危急值标志"); + + migrationBuilder.AlterColumn( + name: "critical_value_create_date", + table: "register_check", + type: "date", + nullable: true, + oldClrType: typeof(DateOnly), + oldType: "date", + oldNullable: true, + oldComment: "危急值创建日期"); + + migrationBuilder.AlterColumn( + name: "critical_value", + table: "register_check", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "危急值"); + + migrationBuilder.AlterColumn( + name: "complete_flag", + table: "register_check", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "0", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "0", + oldComment: "完成标志"); + + migrationBuilder.AlterColumn( + name: "check_request_print_times", + table: "register_check", + type: "smallint", + nullable: false, + oldClrType: typeof(short), + oldType: "smallint", + oldComment: "检查申请单打印次数"); + + migrationBuilder.AlterColumn( + name: "check_request_no", + table: "register_check", + type: "uuid", + maxLength: 20, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldMaxLength: 20, + oldComment: "检查单号"); + + migrationBuilder.AlterColumn( + name: "check_doctor_id", + table: "register_check", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "检查医生ID"); + + migrationBuilder.AlterColumn( + name: "check_date", + table: "register_check", + type: "date", + nullable: true, + oldClrType: typeof(DateOnly), + oldType: "date", + oldNullable: true, + oldComment: "检查日期"); + + migrationBuilder.AlterColumn( + name: "auditor_user_id", + table: "register_check", + type: "uuid", + nullable: true, + oldClrType: typeof(Guid), + oldType: "uuid", + oldNullable: true, + oldComment: "审核医生ID"); + + migrationBuilder.AlterColumn( + name: "audit_time", + table: "register_check", + type: "timestamp without time zone", + nullable: true, + oldClrType: typeof(DateTime), + oldType: "timestamp without time zone", + oldNullable: true, + oldComment: "审核时间"); + + migrationBuilder.AlterColumn( + name: "register_asbitem_id", + table: "register_asbitem", + type: "uuid", + nullable: true, + oldClrType: typeof(Guid), + oldType: "uuid", + oldNullable: true, + oldComment: "主键"); + + migrationBuilder.AlterColumn( + name: "lis_request_id", + table: "register_asbitem", + type: "uuid", + maxLength: 20, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldMaxLength: 20, + oldComment: "LIS申请ID"); + + migrationBuilder.AlterColumn( + name: "amount", + table: "register_asbitem", + type: "smallint", + nullable: true, + oldClrType: typeof(short), + oldType: "smallint", + oldNullable: true, + oldComment: "数量"); + + migrationBuilder.AlterColumn( + name: "register_check_id", + table: "register_asbitem", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "检查单ID"); + + migrationBuilder.AlterColumn( + name: "reference_range_value", + table: "reference_range", + type: "character varying(150)", + maxLength: 150, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(150)", + oldMaxLength: 150, + oldNullable: true, + oldComment: "参考范围值数字型保存区间字符型保存文本值"); + + migrationBuilder.AlterColumn( + name: "reference_range_type_flag", + table: "reference_range", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "参考范围类别0-无参考范围,1-数字型,2-字符型,3-性激素"); + + migrationBuilder.AlterColumn( + name: "critical_range_value", + table: "reference_range", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "危急值"); + + migrationBuilder.AlterColumn( + name: "room_id", + table: "queue_register", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "房间ID"); + + migrationBuilder.AlterColumn( + name: "patient_register_id", + table: "queue_register", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "病人登记ID"); + + migrationBuilder.AlterColumn( + name: "no_complete_reason", + table: "queue_register", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "0", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "0", + oldComment: "未完成原因"); + + migrationBuilder.AlterColumn( + name: "display_order", + table: "queue_register", + type: "integer", + nullable: false, + oldClrType: typeof(int), + oldType: "integer", + oldComment: "排队顺序"); + + migrationBuilder.AlterColumn( + name: "complete_flag", + table: "queue_register", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "0", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "0", + oldComment: "完成标志"); + + migrationBuilder.AlterColumn( + name: "call_time", + table: "queue_register", + type: "timestamp without time zone", + nullable: true, + oldClrType: typeof(DateTime), + oldType: "timestamp without time zone", + oldNullable: true, + oldComment: "叫号时间"); + + migrationBuilder.AlterColumn( + name: "price_item_code", + table: "price_item", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "价表编码"); + + migrationBuilder.AlterColumn( + name: "price", + table: "price_item", + type: "numeric(10,2)", + precision: 10, + scale: 2, + nullable: false, + oldClrType: typeof(decimal), + oldType: "numeric(10,2)", + oldPrecision: 10, + oldScale: 2, + oldComment: "价格"); + + migrationBuilder.AlterColumn( + name: "invoice_item_type_id", + table: "price_item", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "发票项目类别ID"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "price_item", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "reply_content", + table: "phone_follow", + type: "character varying(200)", + maxLength: 200, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true, + oldComment: "回复内容"); + + migrationBuilder.AlterColumn( + name: "patient_register_id", + table: "phone_follow", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "病人登记ID"); + + migrationBuilder.AlterColumn( + name: "follow_up_plan_id", + table: "phone_follow", + type: "uuid", + nullable: true, + oldClrType: typeof(Guid), + oldType: "uuid", + oldNullable: true, + oldComment: "随访计划ID"); + + migrationBuilder.AlterColumn( + name: "follow_content", + table: "phone_follow", + type: "character varying(200)", + maxLength: 200, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true, + oldComment: "随访内容"); + + migrationBuilder.AlterColumn( + name: "id", + table: "pay_mode", + type: "character(4)", + fixedLength: true, + maxLength: 4, + nullable: false, + oldClrType: typeof(string), + oldType: "character(4)", + oldFixedLength: true, + oldMaxLength: 4, + oldComment: "编号,固定编码"); + + migrationBuilder.AlterColumn( + name: "telephone", + table: "patient", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "电话"); + + migrationBuilder.AlterColumn( + name: "sex_id", + table: "patient", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "性别"); + + migrationBuilder.AlterColumn( + name: "postal_code", + table: "patient", + type: "character varying(10)", + maxLength: 10, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(10)", + oldMaxLength: 10, + oldNullable: true, + oldComment: "邮政编码"); + + migrationBuilder.AlterColumn( + name: "patient_password", + table: "patient", + type: "character varying(10)", + maxLength: 10, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(10)", + oldMaxLength: 10, + oldNullable: true, + oldComment: "登录密码"); + + migrationBuilder.AlterColumn( + name: "nation_id", + table: "patient", + type: "uuid", + fixedLength: true, + nullable: true, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldNullable: true, + oldComment: "民族编号"); + + migrationBuilder.AlterColumn( + name: "mobile_telephone", + table: "patient", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "手机号"); + + migrationBuilder.AlterColumn( + name: "marital_status_id", + table: "patient", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "婚姻状况"); + + migrationBuilder.AlterColumn( + name: "id_no", + table: "patient", + type: "character varying(18)", + maxLength: 18, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(18)", + oldMaxLength: 18, + oldNullable: true, + oldComment: "身份证号"); + + migrationBuilder.AlterColumn( + name: "email", + table: "patient", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "email"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "patient", + type: "character varying(30)", + maxLength: 30, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(30)", + oldMaxLength: 30, + oldNullable: true, + oldComment: "姓名"); + + migrationBuilder.AlterColumn( + name: "birth_place_id", + table: "patient", + type: "uuid", + fixedLength: true, + nullable: true, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldNullable: true, + oldComment: "出生地"); + + migrationBuilder.AlterColumn( + name: "birth_date", + table: "patient", + type: "date", + nullable: true, + oldClrType: typeof(DateOnly), + oldType: "date", + oldNullable: true, + oldComment: "出生日期"); + + migrationBuilder.AlterColumn( + name: "address", + table: "patient", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "地址"); + + migrationBuilder.AlterColumn( + name: "organization_unit_id", + table: "organization_units_customer_org", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "体检中心编号"); + + migrationBuilder.AlterColumn( + name: "customer_org_id", + table: "organization_units_customer_org", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "客户单位编号"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "medical_report_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "asbitem_id", + table: "medical_package_detail", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "组合项目编号"); + + migrationBuilder.AlterColumn( + name: "sign_in_time", + table: "lis_request", + type: "date", + nullable: true, + oldClrType: typeof(DateOnly), + oldType: "date", + oldNullable: true, + oldComment: "签收时间"); + + migrationBuilder.AlterColumn( + name: "sign_in_person", + table: "lis_request", + type: "character varying(16)", + maxLength: 16, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(16)", + oldMaxLength: 16, + oldNullable: true, + oldComment: "签收人姓名"); + + migrationBuilder.AlterColumn( + name: "sign_in_order", + table: "lis_request", + type: "integer", + nullable: true, + oldClrType: typeof(int), + oldType: "integer", + oldNullable: true, + oldComment: "签收顺序"); + + migrationBuilder.AlterColumn( + name: "sampling_time", + table: "lis_request", + type: "date", + nullable: true, + oldClrType: typeof(DateOnly), + oldType: "date", + oldNullable: true, + oldComment: "采样时间"); + + migrationBuilder.AlterColumn( + name: "sampler", + table: "lis_request", + type: "character varying(16)", + maxLength: 16, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(16)", + oldMaxLength: 16, + oldNullable: true, + oldComment: "采样人姓名"); + + migrationBuilder.AlterColumn( + name: "sample_type_id", + table: "lis_request", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "标本类型"); + + migrationBuilder.AlterColumn( + name: "sample_container_id", + table: "lis_request", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "标本容器编号"); + + migrationBuilder.AlterColumn( + name: "patient_register_id", + table: "lis_request", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "病人登记ID"); + + migrationBuilder.AlterColumn( + name: "lis_request_no", + table: "lis_request", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "检验申请单号"); + + migrationBuilder.AlterColumn( + name: "is_sign_in", + table: "lis_request", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是签收"); + + migrationBuilder.AlterColumn( + name: "is_print", + table: "lis_request", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是否已打印"); + + migrationBuilder.AlterColumn( + name: "simple_code", + table: "item_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "自定义简码"); + + migrationBuilder.AlterColumn( + name: "path_code", + table: "item_type", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "路径编码"); + + migrationBuilder.AlterColumn( + name: "parent_id", + table: "item_type", + type: "uuid", + fixedLength: true, + nullable: true, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldNullable: true, + oldComment: "父id"); + + migrationBuilder.AlterColumn( + name: "medical_report_type_id", + table: "item_type", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "体检报告类别"); + + migrationBuilder.AlterColumn( + name: "is_merge_asbitem", + table: "item_type", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "合并组合项目,Y-是,N-否"); + + migrationBuilder.AlterColumn( + name: "guid_type_id", + table: "item_type", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "指引类别"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "item_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "check_type_flag", + table: "item_type", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "'G'::bpchar", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "'G'::bpchar", + oldComment: "检查类别,0-普通检查,1-检验,2-影像检查"); + + migrationBuilder.AlterColumn( + name: "item_id", + table: "item_template_detail", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "项目编号"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "item_default_result", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "unit_id", + table: "item", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "单位"); + + migrationBuilder.AlterColumn( + name: "result_template_type_flag", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "0", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "0", + oldComment: "结果模板类别标志"); + + migrationBuilder.AlterColumn( + name: "reference_range_type_flag", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "'E'::bpchar", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "'E'::bpchar", + oldComment: "参考范围类别0-无参考范围,1-数字型,2-字符型,3-性激素"); + + migrationBuilder.AlterColumn( + name: "price_item_id", + table: "item", + type: "uuid", + fixedLength: true, + maxLength: 8, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldMaxLength: 8, + oldComment: "价表项目编码"); + + migrationBuilder.AlterColumn( + name: "price", + table: "item", + type: "numeric(10,2)", + precision: 10, + scale: 2, + nullable: false, + oldClrType: typeof(decimal), + oldType: "numeric(10,2)", + oldPrecision: 10, + oldScale: 2, + oldComment: "价格"); + + migrationBuilder.AlterColumn( + name: "item_type_id", + table: "item", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "项目类别"); + + migrationBuilder.AlterColumn( + name: "is_produce_summary", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是生成小结"); + + migrationBuilder.AlterColumn( + name: "is_name_into_summary", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "名称进入小结"); + + migrationBuilder.AlterColumn( + name: "is_diagnosis_function", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "启用诊断函数"); + + migrationBuilder.AlterColumn( + name: "is_continue_process", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是继续处理"); + + migrationBuilder.AlterColumn( + name: "is_calculation_item", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是计算项目"); + + migrationBuilder.AlterColumn( + name: "is_active", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "启用"); + + migrationBuilder.AlterColumn( + name: "input_check", + table: "item", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "输入结果校验公式"); + + migrationBuilder.AlterColumn( + name: "english_short_name", + table: "item", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "英文缩写"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "item", + type: "character varying(30)", + maxLength: 30, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(30)", + oldMaxLength: 30, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "diagnosis_function", + table: "item", + type: "character varying(2000)", + maxLength: 2000, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(2000)", + oldMaxLength: 2000, + oldNullable: true, + oldComment: "诊断函数"); + + migrationBuilder.AlterColumn( + name: "default_result", + table: "item", + type: "character varying(200)", + maxLength: 200, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true, + oldComment: "默认结果"); + + migrationBuilder.AlterColumn( + name: "calculation_function", + table: "item", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "计算函数"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "invoice_org", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "invoice_item_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "patient_register_no", + table: "import_pacs_result", + type: "character varying(12)", + maxLength: 12, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(12)", + oldMaxLength: 12, + oldNullable: true, + oldComment: "人员登记号"); + + migrationBuilder.AlterColumn( + name: "is_print", + table: "import_pacs_picture", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "检查所见", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是否打印"); + + migrationBuilder.AlterColumn( + name: "check_request_no", + table: "import_pacs_picture", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "检查申请单号"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "guide_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "follow_up_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "remark", + table: "follow_up_plan", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "备注"); + + migrationBuilder.AlterColumn( + name: "perfom_user_id", + table: "follow_up_plan", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "执行者用户ID"); + + migrationBuilder.AlterColumn( + name: "perfom_time", + table: "follow_up_plan", + type: "timestamp without time zone", + nullable: true, + oldClrType: typeof(DateTime), + oldType: "timestamp without time zone", + oldNullable: true, + oldComment: "执行时间"); + + migrationBuilder.AlterColumn( + name: "perfom_flag", + table: "follow_up_plan", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "执行标志"); + + migrationBuilder.AlterColumn( + name: "is_loop", + table: "follow_up_plan", + type: "character(1)", + maxLength: 1, + nullable: true, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldNullable: true, + oldComment: "是否循环"); + + migrationBuilder.AlterColumn( + name: "follow_up_type_id", + table: "follow_up_plan", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "随访类别"); + + migrationBuilder.AlterColumn( + name: "follow_up_mode_id", + table: "follow_up_plan", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "随访方式"); + + migrationBuilder.AlterColumn( + name: "doctor_user_id", + table: "follow_up_plan", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "医生"); + + migrationBuilder.AlterColumn( + name: "cycle_days", + table: "follow_up_plan", + type: "smallint", + nullable: false, + oldClrType: typeof(short), + oldType: "smallint", + oldComment: "周期天数"); + + migrationBuilder.AlterColumn( + name: "content", + table: "follow_up_plan", + type: "character varying(200)", + maxLength: 200, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true, + oldComment: "随访内容"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "follow_up_mode", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "path_code", + table: "diagnosis_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "路径编码"); + + migrationBuilder.AlterColumn( + name: "parent_id", + table: "diagnosis_type", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "父编号"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "diagnosis_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "diagnosis_id", + table: "diagnosis_template_detail", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "诊断编号"); + + migrationBuilder.AlterColumn( + name: "diagnosis_template_id", + table: "diagnosis_template_detail", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "诊断模板编号"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "diagnosis_template", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "diagnosis_postfix", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "suggestion_name", + table: "diagnosis", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "建议名称"); + + migrationBuilder.AlterColumn( + name: "item_type_id", + table: "diagnosis", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "项目类别"); + + migrationBuilder.AlterColumn( + name: "is_summary_template", + table: "diagnosis", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是总检模板"); + + migrationBuilder.AlterColumn( + name: "is_ill", + table: "diagnosis", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是疾病"); + + migrationBuilder.AlterColumn( + name: "for_sex_id", + table: "diagnosis", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "'A'::bpchar", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "'A'::bpchar", + oldComment: "适用性别"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "diagnosis", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "diagnosis_level_id", + table: "diagnosis", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "诊断级别"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "customer_org_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "register_no", + table: "customer_org_register", + type: "character varying(12)", + maxLength: 12, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(12)", + oldMaxLength: 12, + oldNullable: true, + oldComment: "计划号"); + + migrationBuilder.AlterColumn( + name: "register_name", + table: "customer_org_register", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "计划名称"); + + migrationBuilder.AlterColumn( + name: "price", + table: "customer_org_group_detail", + type: "numeric(10,2)", + precision: 10, + scale: 2, + nullable: false, + oldClrType: typeof(decimal), + oldType: "numeric(10,2)", + oldPrecision: 10, + oldScale: 2, + oldComment: "价格"); + + migrationBuilder.AlterColumn( + name: "asbitem_id", + table: "customer_org_group_detail", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "组合项目编号"); + + migrationBuilder.AlterColumn( + name: "customer_org_group_id", + table: "customer_org_group_detail", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "分组编号"); + + migrationBuilder.AlterColumn( + name: "pay_mode_id", + table: "customer_org_charge_pay", + type: "character(4)", + fixedLength: true, + maxLength: 4, + nullable: true, + oldClrType: typeof(string), + oldType: "character(4)", + oldFixedLength: true, + oldMaxLength: 4, + oldNullable: true, + oldComment: "支付方式"); + + migrationBuilder.AlterColumn( + name: "charge_money", + table: "customer_org_charge_pay", + type: "numeric(10,2)", + precision: 10, + scale: 2, + nullable: false, + oldClrType: typeof(decimal), + oldType: "numeric(10,2)", + oldPrecision: 10, + oldScale: 2, + oldComment: "支付金额"); + + migrationBuilder.AlterColumn( + name: "back_moeny", + table: "customer_org_charge_back_pay", + type: "numeric(10,2)", + precision: 10, + scale: 2, + nullable: false, + oldClrType: typeof(decimal), + oldType: "numeric(10,2)", + oldPrecision: 10, + oldScale: 2, + oldComment: "退费金额"); + + migrationBuilder.AlterColumn( + name: "pay_mode_id", + table: "customer_org_charge_back_pay", + type: "character(4)", + fixedLength: true, + maxLength: 4, + nullable: false, + oldClrType: typeof(string), + oldType: "character(4)", + oldFixedLength: true, + oldMaxLength: 4, + oldComment: "支付方式"); + + migrationBuilder.AlterColumn( + name: "settle_account_id", + table: "customer_org_charge_back", + type: "uuid", + nullable: true, + oldClrType: typeof(Guid), + oldType: "uuid", + oldNullable: true, + oldComment: "结算账户ID"); + + migrationBuilder.AlterColumn( + name: "customer_org_charge_id", + table: "customer_org_charge_back", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "收费编号"); + + migrationBuilder.AlterColumn( + name: "settle_account_id", + table: "customer_org_charge", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "结算账户ID"); + + migrationBuilder.AlterColumn( + name: "payer", + table: "customer_org_charge", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "付款人"); + + migrationBuilder.AlterColumn( + name: "customer_org_register_id", + table: "customer_org_charge", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "客户单位登记ID"); + + migrationBuilder.AlterColumn( + name: "charge_flag", + table: "customer_org_charge", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "收退费标志"); + + migrationBuilder.AlterColumn( + name: "status_flag", + table: "customer_org", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "0", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "0", + oldComment: "状态"); + + migrationBuilder.AlterColumn( + name: "short_name", + table: "customer_org", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "简称"); + + migrationBuilder.AlterColumn( + name: "path_code", + table: "customer_org", + type: "character varying(60)", + maxLength: 60, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(60)", + oldMaxLength: 60, + oldNullable: true, + oldComment: "路径编码"); + + migrationBuilder.AlterColumn( + name: "parent_id", + table: "customer_org", + type: "uuid", + fixedLength: true, + nullable: true, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldNullable: true, + oldComment: "父编号"); + + migrationBuilder.AlterColumn( + name: "is_lock", + table: "customer_org", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "锁住"); + + migrationBuilder.AlterColumn( + name: "invoice_name", + table: "customer_org", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "开票名称"); + + migrationBuilder.AlterColumn( + name: "path_code", + table: "critical_value_type", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "路径编码"); + + migrationBuilder.AlterColumn( + name: "parent_id", + table: "critical_value_type", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "父编号"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "critical_value_type", + type: "character varying(40)", + maxLength: 40, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(40)", + oldMaxLength: 40, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "critical_value", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "critical_value_type_id", + table: "critical_value", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "危急值类别编号"); + + migrationBuilder.AlterColumn( + name: "title", + table: "contact_person", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "职务"); + + migrationBuilder.AlterColumn( + name: "remark", + table: "contact_person", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "备注"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "contact_person", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "姓名"); + + migrationBuilder.AlterColumn( + name: "customer_org_id", + table: "contact_person", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "客户单位编号"); + + migrationBuilder.AlterColumn( + name: "contact_method_value", + table: "contact_method", + type: "character varying(15)", + maxLength: 15, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(15)", + oldMaxLength: 15, + oldNullable: true, + oldComment: "联系方式,比如18911254911,839860190@qq.com"); + + migrationBuilder.AlterColumn( + name: "contact_method_type", + table: "contact_method", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "'M'::bpchar", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "'M'::bpchar", + oldComment: "联系方式类别-比如0-手机、1-电子邮箱"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "common_char_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "common_char", + type: "character varying(1)", + maxLength: 1, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(1)", + oldMaxLength: 1, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "common_char_type_id", + table: "common_char", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "常用字符类别编号"); + + migrationBuilder.AlterColumn( + name: "back_moeny", + table: "charge_back_pay", + type: "numeric(10,2)", + precision: 10, + scale: 2, + nullable: false, + oldClrType: typeof(decimal), + oldType: "numeric(10,2)", + oldPrecision: 10, + oldScale: 2, + oldComment: "退费金额"); + + migrationBuilder.AlterColumn( + name: "pay_mode_id", + table: "charge_back_pay", + type: "character(4)", + fixedLength: true, + maxLength: 4, + nullable: false, + oldClrType: typeof(string), + oldType: "character(4)", + oldFixedLength: true, + oldMaxLength: 4, + oldComment: "支付方式ID"); + + migrationBuilder.AlterColumn( + name: "settle_account_id", + table: "charge_back", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "结账ID"); + + migrationBuilder.AlterColumn( + name: "settle_account_id", + table: "charge", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "结账ID"); + + migrationBuilder.AlterColumn( + name: "country_code", + table: "birth_place", + type: "character varying(6)", + maxLength: 6, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(6)", + oldMaxLength: 6, + oldNullable: true, + oldComment: "国家标准码"); + + migrationBuilder.AlterColumn( + name: "path_code", + table: "bigtext_result_type", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "路径编码"); + + migrationBuilder.AlterColumn( + name: "parent_id", + table: "bigtext_result_type", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "父编号"); + + migrationBuilder.AlterColumn( + name: "item_type_id", + table: "bigtext_result_type", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "项目类别"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "bigtext_result_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "bigtext_result_template", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "bigtext_result_type_id", + table: "bigtext_result_template", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "结果类别编号"); + + migrationBuilder.AlterColumn( + name: "description", + table: "bigtext_result_description", + type: "character varying(200)", + maxLength: 200, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true, + oldComment: "描述"); + + migrationBuilder.AlterColumn( + name: "conclusion", + table: "bigtext_result_conclusion", + type: "character varying(200)", + maxLength: 200, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true, + oldComment: "结论"); + + migrationBuilder.AlterColumn( + name: "price_item_id", + table: "asbitem_price_item", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "价表项目编码"); + + migrationBuilder.AlterColumn( + name: "asbitem_id", + table: "asbitem_price_item", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "组合项目编号"); + + migrationBuilder.AlterColumn( + name: "amount", + table: "asbitem_price_item", + type: "smallint", + nullable: true, + oldClrType: typeof(short), + oldType: "smallint", + oldNullable: true, + oldComment: "数量"); + + migrationBuilder.AlterColumn( + name: "guide", + table: "asbitem_guide", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "指引单内容"); + + migrationBuilder.AlterColumn( + name: "for_sex_id", + table: "asbitem_guide", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "适用性别ID"); + + migrationBuilder.AlterColumn( + name: "asbitem_id", + table: "asbitem_guide", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "组合项目ID"); + + migrationBuilder.AlterColumn( + name: "organization_unit_id", + table: "asbitem_guide", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "单位科室ID"); + + migrationBuilder.AlterColumn( + name: "item_id", + table: "asbitem_detail", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "项目编码"); + } + } +} diff --git a/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230625011736_i0625.Designer.cs b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230625011736_i0625.Designer.cs new file mode 100644 index 00000000..8060b2fd --- /dev/null +++ b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230625011736_i0625.Designer.cs @@ -0,0 +1,10687 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; +using Shentun.Peis.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Shentun.Peis.Migrations +{ + [DbContext(typeof(PeisDbContext))] + [Migration("20230625011736_i0625")] + partial class i0625 + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.PostgreSql) + .HasAnnotation("ProductVersion", "6.0.5") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("AsbitemRoom", b => + { + b.Property("AsbitemId") + .HasColumnType("uuid"); + + b.Property("RoomId") + .HasColumnType("uuid"); + + b.HasKey("AsbitemId", "RoomId"); + + b.ToTable("AsbitemRoom"); + }); + + modelBuilder.Entity("ChildDiagnosis", b => + { + b.Property("ParentDiagnosisId") + .HasMaxLength(8) + .HasColumnType("uuid") + .HasColumnName("parent_diagnosis_id") + .IsFixedLength(); + + b.Property("DiagnosisId") + .HasMaxLength(8) + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength(); + + b.HasKey("ParentDiagnosisId", "DiagnosisId") + .HasName("pk_child_diagnosis"); + + b.HasIndex("DiagnosisId"); + + b.ToTable("child_diagnosis", (string)null); + + b.HasComment("子诊断"); + }); + + modelBuilder.Entity("DiagnosisDiagnosis", b => + { + b.Property("DiagnosisId") + .HasColumnType("uuid"); + + b.Property("ParentDiagnosisId") + .HasColumnType("uuid"); + + b.HasKey("DiagnosisId", "ParentDiagnosisId"); + + b.ToTable("DiagnosisDiagnosis"); + }); + + modelBuilder.Entity("RoomAsbitem", b => + { + b.Property("RoomId") + .HasMaxLength(5) + .HasColumnType("uuid") + .HasColumnName("room_id") + .IsFixedLength(); + + b.Property("AsbitemId") + .HasMaxLength(6) + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength(); + + b.HasKey("RoomId", "AsbitemId") + .HasName("pk_room_asbitem"); + + b.HasIndex("AsbitemId"); + + b.ToTable("room_asbitem", (string)null); + + b.HasComment("房间包含组合项目设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.HelloA", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ADesc") + .HasColumnType("text") + .HasColumnName("a_desc"); + + b.Property("AName") + .ValueGeneratedOnAdd() + .HasColumnType("text") + .HasDefaultValue("默认值") + .HasColumnName("a_name"); + + b.Property("AddTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("add_time") + .HasDefaultValueSql("now()"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("HelloTypeId") + .HasColumnType("uuid") + .HasColumnName("hello_type_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("HelloTypeId"); + + b.ToTable("hello_a"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.HelloType", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("TypeName") + .HasColumnType("text") + .HasColumnName("type_name") + .HasComment("类型名称"); + + b.HasKey("Id"); + + b.ToTable("hello_type"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.Student", b => + { + b.Property("Sid") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("sid"); + + b.Property("Cid") + .HasColumnType("text"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasColumnType("text"); + + b.Property("Uid") + .HasColumnType("uuid"); + + b.HasKey("Sid"); + + b.ToTable("student"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.TestA", b => + { + b.Property("AId") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("AName") + .HasColumnType("text"); + + b.HasKey("AId"); + + b.ToTable("testa"); + + b.HasComment("组合项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.TestB", b => + { + b.Property("BId") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("AId") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("AName") + .HasColumnType("text"); + + b.Property("TestAsAId") + .HasColumnType("uuid"); + + b.HasKey("BId"); + + b.HasIndex("TestAsAId"); + + b.ToTable("testb"); + + b.HasComment("组合项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Asbitem", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("ClinicalMeaning") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("clinical_meaning"); + + b.Property("CreationTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DefaultResult") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("default_result"); + + b.Property("DeviceTypeId") + .HasColumnType("uuid") + .HasColumnName("device_type_id") + .IsFixedLength(); + + b.Property("DiagnosisFunction") + .HasMaxLength(1000) + .HasColumnType("character varying(1000)") + .HasColumnName("diagnosis_function"); + + b.Property("DisplayName") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar"); + + b.Property("InvoiceItemTypeId") + .HasColumnType("uuid") + .HasColumnName("invoice_item_type_id") + .IsFixedLength(); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active"); + + b.Property("IsBeforeEat") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_before_eat"); + + b.Property("IsCheck") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_check"); + + b.Property("IsContinueProcess") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_continue_process"); + + b.Property("IsDiagnosisFunction") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_diagnosis_function"); + + b.Property("IsItemResultMerger") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_item_result_merger"); + + b.Property("IsPictureRotate") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_picture_rotate"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Price") + .HasPrecision(8, 2) + .HasColumnType("numeric(8,2)") + .HasColumnName("price"); + + b.Property("QueueTime") + .HasPrecision(3, 1) + .HasColumnType("numeric(3,1)") + .HasColumnName("queue_time"); + + b.Property("ShortName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("short_name"); + + b.Property("SimpleCode") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("InvoiceItemTypeId"); + + b.HasIndex("ItemTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_asbitem") + .IsUnique(); + + b.ToTable("asbitem"); + + b.HasComment("组合项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.AsbitemDetail", b => + { + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength(); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength(); + + b.HasKey("AsbitemId", "ItemId") + .HasName("pk_department_asbitem_detail"); + + b.HasIndex("ItemId"); + + b.ToTable("asbitem_detail"); + + b.HasComment("组合项目包含项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.AsbitemGuide", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id") + .IsFixedLength(); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength(); + + b.Property("ForSexId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id"); + + b.Property("Guide") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("guide"); + + b.HasKey("OrganizationUnitId", "AsbitemId", "ForSexId") + .HasName("pk_department_asbitem_guide"); + + b.ToTable("asbitem_guide"); + + b.HasComment("体检中心组和项目指引内容"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.AsbitemPriceItem", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("Amount") + .HasColumnType("smallint") + .HasColumnName("amount"); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PriceItemId") + .HasColumnType("uuid") + .HasColumnName("price_item_id") + .IsFixedLength(); + + b.HasKey("Id"); + + b.ToTable("asbitem_price_item"); + + b.HasComment("组和项目包含价表项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultConclusion", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("BigtextResultTemplateId") + .HasColumnType("uuid") + .HasColumnName("bigtext_result_template_id") + .IsFixedLength(); + + b.Property("Conclusion") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("conclusion"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("BigtextResultTemplateId"); + + b.ToTable("bigtext_result_conclusion"); + + b.HasComment("大文本结果结论"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultDescription", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("BigtextResultTemplateId") + .HasColumnType("uuid") + .HasColumnName("bigtext_result_template_id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("description"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("BigtextResultTemplateId"); + + b.ToTable("bigtext_result_description"); + + b.HasComment("大文本结果描述"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("BigtextResultTypeId") + .HasColumnType("uuid") + .HasColumnName("bigtext_result_type_id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("BigtextResultTypeId"); + + b.ToTable("bigtext_result_template"); + + b.HasComment("大文本结果模板"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength(); + + b.Property("PathCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("path_code"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("ItemTypeId"); + + b.ToTable("bigtext_result_type"); + + b.HasComment("大文本结果类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BirthPlace", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CountryCode") + .HasMaxLength(6) + .HasColumnType("character varying(6)") + .HasColumnName("country_code"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_birth_place") + .IsUnique(); + + b.ToTable("birth_place"); + + b.HasComment("出生地"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardBill", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("编号"); + + b.Property("BillFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("bill_flag") + .HasDefaultValueSql("'0'::bpchar") + .HasComment("记账标志"); + + b.Property("BillMoney") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("bill_money") + .HasComment("记账金额"); + + b.Property("CardRegisterId") + .HasColumnType("uuid") + .HasColumnName("card_register_id") + .HasComment("卡登记编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PayModeId") + .ValueGeneratedOnAdd() + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("pay_mode_id") + .HasDefaultValueSql("'1'::bpchar") + .IsFixedLength() + .HasComment("支付方式"); + + b.HasKey("Id"); + + b.HasIndex("CardRegisterId"); + + b.HasIndex("PayModeId"); + + b.ToTable("card_bill"); + + b.HasComment("卡记账记录"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardRegister", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("编号"); + + b.Property("CardFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("card_flag") + .HasDefaultValueSql("0") + .HasComment("使用标志"); + + b.Property("CardNo") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("card_no") + .HasComment("卡号"); + + b.Property("CardPassword") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("card_password"); + + b.Property("CardTypeId") + .HasColumnType("uuid") + .HasColumnName("card_type_id") + .IsFixedLength() + .HasComment("卡类型"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("customer_name") + .HasComment("领用者"); + + b.Property("Discount") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("discount") + .HasDefaultValueSql("100") + .HasComment("折扣"); + + b.Property("ExpiryDate") + .HasColumnType("date") + .HasColumnName("expiry_date") + .HasComment("有效期"); + + b.Property("IdNo") + .HasMaxLength(18) + .HasColumnType("character varying(18)") + .HasColumnName("id_no") + .HasComment("身份证号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MobileTelephone") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("mobile_telephone") + .HasComment("手机"); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id") + .IsFixedLength(); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("Telephone") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("telephone") + .HasComment("电话"); + + b.HasKey("Id"); + + b.HasIndex("CardTypeId"); + + b.HasIndex("OrganizationUnitId"); + + b.HasIndex(new[] { "CardNo", "CardFlag" }, "ix_card_register") + .IsUnique(); + + b.ToTable("card_register"); + + b.HasComment("会员卡登记"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("CardModeId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("card_mode_id") + .HasDefaultValueSql("0") + .HasComment("卡模式"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("Discount") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("discount") + .HasDefaultValueSql("100") + .HasComment("折扣"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("ExpiryDay") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("expiry_day") + .HasDefaultValueSql("3650") + .HasComment("有效期"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark") + .HasComment("备注"); + + b.HasKey("Id"); + + b.ToTable("card_type"); + + b.HasComment("会员卡类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Charge", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("收据号"); + + b.Property("ChargeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("charge_flag") + .HasDefaultValueSql("0"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("InvoiceNo") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("invoice_no"); + + b.Property("InvoiceOrgName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("invoice_org_name"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("登记流水号"); + + b.Property("SettleAccountId") + .HasColumnType("uuid") + .HasColumnName("settle_account_id"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "PatientRegisterId" }, "fki_fk_patient_register_charge"); + + b.HasIndex(new[] { "PatientRegisterId" }, "ix_charge"); + + b.ToTable("charge"); + + b.HasComment("收费主档"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeAsbitem", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Amount") + .HasColumnType("smallint") + .HasColumnName("amount"); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength() + .HasComment("组合项目"); + + b.Property("ChargeId") + .HasColumnType("uuid") + .HasColumnName("charge_id") + .HasComment("收据号"); + + b.Property("ChargePrice") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_price") + .HasComment("价格"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("RegisterAsbitemId") + .HasColumnType("uuid") + .HasColumnName("register_asbitem_id"); + + b.HasKey("Id"); + + b.HasIndex("AsbitemId"); + + b.HasIndex("ChargeId"); + + b.ToTable("charge_asbitem"); + + b.HasComment("收费包含组合项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeBack", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("退费编号"); + + b.Property("ChargeId") + .HasColumnType("uuid") + .HasColumnName("charge_id") + .HasComment("收据号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SettleAccountId") + .HasColumnType("uuid") + .HasColumnName("settle_account_id"); + + b.HasKey("Id"); + + b.HasIndex("ChargeId"); + + b.ToTable("charge_back"); + + b.HasComment("退费主档"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeBackPay", b => + { + b.Property("ChargeBackId") + .HasColumnType("uuid") + .HasColumnName("charge_back_id"); + + b.Property("PayModeId") + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("pay_mode_id") + .IsFixedLength(); + + b.Property("BackMoeny") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("back_moeny"); + + b.HasKey("ChargeBackId", "PayModeId") + .HasName("pk_department_charge_back_pay"); + + b.HasIndex("PayModeId"); + + b.ToTable("charge_back_pay"); + + b.HasComment("退费支付方式"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargePay", b => + { + b.Property("ChargeId") + .HasColumnType("uuid") + .HasColumnName("charge_id") + .HasComment("收据号"); + + b.Property("PayModeId") + .ValueGeneratedOnAdd() + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("pay_mode_id") + .HasDefaultValueSql("'1'::bpchar") + .IsFixedLength() + .HasComment("支付方式"); + + b.Property("CardBillId") + .HasColumnType("uuid") + .HasColumnName("card_bill_id"); + + b.Property("ChargeMoney") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_money") + .HasComment("金额"); + + b.HasKey("ChargeId", "PayModeId") + .HasName("pk_department_charge_pay"); + + b.HasIndex("PayModeId"); + + b.ToTable("charge_pay"); + + b.HasComment("收费支付方式"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargePriceItem", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Amount") + .HasColumnType("smallint") + .HasColumnName("amount"); + + b.Property("ChargeAsbitemId") + .HasColumnType("uuid") + .HasColumnName("charge_asbitem_id"); + + b.Property("ChargePrice") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_price"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PriceItemId") + .HasColumnType("uuid") + .HasColumnName("price_item_id"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "ChargeAsbitemId" }, "fki_fk_charge_asbitem"); + + b.HasIndex(new[] { "ChargeAsbitemId", "PriceItemId" }, "ix_charge_price_item"); + + b.ToTable("charge_price_item"); + + b.HasComment("收费价表项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CommonChar", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CommonCharTypeId") + .HasColumnType("uuid") + .HasColumnName("common_char_type_id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(1) + .HasColumnType("character varying(1)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(1) + .HasColumnType("character varying(1)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("CommonCharTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_common_char") + .IsUnique(); + + b.ToTable("common_char"); + + b.HasComment("常用字符"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CommonCharType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_common_char_type") + .IsUnique(); + + b.ToTable("common_char_type"); + + b.HasComment("常用字符类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ContactMethod", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ContactMethodType") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("contact_method_type") + .HasDefaultValueSql("'M'::bpchar"); + + b.Property("ContactMethodValue") + .HasMaxLength(15) + .HasColumnType("character varying(15)") + .HasColumnName("contact_method_value"); + + b.Property("ContactPersonId") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("ContactPersonId"); + + b.ToTable("contact_method"); + + b.HasComment("联系方式"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ContactPerson", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgId") + .HasColumnType("uuid") + .HasColumnName("customer_org_id") + .IsFixedLength(); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("Title") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("title"); + + b.HasKey("Id"); + + b.HasIndex("CustomerOrgId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_contact"); + + b.HasIndex(new[] { "SimpleCode" }, "ix_contact_simple_code"); + + b.ToTable("contact_person"); + + b.HasComment("联系人"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CriticalValue", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CriticalValueTypeId") + .HasColumnType("uuid") + .HasColumnName("critical_value_type_id") + .IsFixedLength(); + + b.Property("DisplayName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("CriticalValueTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_critical_value") + .IsUnique(); + + b.ToTable("critical_value"); + + b.HasComment("危急值关键字设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CriticalValueType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength(); + + b.Property("PathCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("path_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_critical_value_type") + .IsUnique(); + + b.ToTable("critical_value_type"); + + b.HasComment("危急值类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrg", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("单位ID"); + + b.Property("Accounts") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("accounts") + .HasComment("银行帐号"); + + b.Property("Address") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("address") + .HasComment("联系地址"); + + b.Property("Bank") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("bank") + .HasComment("业务银行"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("单位名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("Fax") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("fax") + .HasComment("传真"); + + b.Property("InvoiceName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("invoice_name"); + + b.Property("IsLock") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_lock"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OrgTypeId") + .HasColumnType("uuid") + .HasColumnName("org_type_id") + .IsFixedLength() + .HasComment("单位性质"); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength(); + + b.Property("PathCode") + .HasMaxLength(60) + .HasColumnType("character varying(60)") + .HasColumnName("path_code"); + + b.Property("PostalCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("postal_code") + .HasComment("邮政编码"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("ShortName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("short_name"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code") + .HasComment("拼音简码"); + + b.Property("StatusFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("status_flag") + .HasDefaultValueSql("0"); + + b.Property("Telephone") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("telephone") + .HasComment("联系电话"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "OrganizationUnitId" }, "fki_fk_customer_org_organization_units"); + + b.HasIndex(new[] { "ParentId", "DisplayName" }, "ix_org") + .IsUnique(); + + b.ToTable("customer_org"); + + b.HasComment("团检单位设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgCharge", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ChargeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("charge_flag"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgRegisterId") + .HasColumnType("uuid") + .HasColumnName("customer_org_register_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Payer") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("payer"); + + b.Property("SettleAccountId") + .HasColumnType("uuid") + .HasColumnName("settle_account_id"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "CustomerOrgRegisterId" }, "fki_fk_customer_org_charge_register"); + + b.ToTable("customer_org_charge"); + + b.HasComment("团检单位收费"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargeBack", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgChargeId") + .HasColumnType("uuid") + .HasColumnName("customer_org_charge_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SettleAccountId") + .HasColumnType("uuid") + .HasColumnName("settle_account_id"); + + b.HasKey("Id"); + + b.HasIndex("CustomerOrgChargeId"); + + b.ToTable("customer_org_charge_back"); + + b.HasComment("团检单位退费"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargeBackPay", b => + { + b.Property("CustomerOrgChargeBackId") + .HasColumnType("uuid") + .HasColumnName("customer_org_charge_back_id"); + + b.Property("PayModeId") + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("pay_mode_id") + .IsFixedLength(); + + b.Property("BackMoeny") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("back_moeny"); + + b.HasKey("CustomerOrgChargeBackId", "PayModeId") + .HasName("pk_org_charge_back_pay"); + + b.HasIndex("PayModeId"); + + b.ToTable("customer_org_charge_back_pay"); + + b.HasComment("团结退费支付方式"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargePay", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ChargeMoney") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_money"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PayModeId") + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("pay_mode_id") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("PayModeId"); + + b.ToTable("customer_org_charge_pay"); + + b.HasComment("团检收费支付方式"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgGroup", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("分组编号"); + + b.Property("AgeLowerLimit") + .HasColumnType("smallint") + .HasColumnName("age_lower_limit") + .HasComment("适用年龄下限"); + + b.Property("AgeUpperLimit") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasColumnName("age_upper_limit") + .HasDefaultValueSql("120") + .HasComment("适用年龄上限"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgRegisterId") + .HasColumnType("uuid") + .HasColumnName("customer_org_register_id"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("分组名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar") + .HasComment("适用性别"); + + b.Property("JobPost") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("job_post") + .HasComment("适用职务"); + + b.Property("JobTitle") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("job_title") + .HasComment("适用职称"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MaritalStatusId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("marital_status_id") + .HasComment("适用婚姻状况"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price") + .HasComment("价格"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark") + .HasComment("备注"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "CustomerOrgRegisterId" }, "fki_fk_customer_org_group_register"); + + b.ToTable("customer_org_group"); + + b.HasComment("团体分组主档"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgGroupDetail", b => + { + b.Property("CustomerOrgGroupId") + .HasColumnType("uuid") + .HasColumnName("customer_org_group_id") + .IsFixedLength(); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength(); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price"); + + b.HasKey("CustomerOrgGroupId", "AsbitemId") + .HasName("pk_org_group_detail"); + + b.HasIndex("AsbitemId"); + + b.ToTable("customer_org_group_detail"); + + b.HasComment("团检分组包含组合项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgRegister", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("BeginTime") + .ValueGeneratedOnAdd() + .HasColumnType("date") + .HasColumnName("begin_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)") + .HasComment("开始日期"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgId") + .HasColumnType("uuid") + .HasColumnName("customer_org_id") + .IsFixedLength() + .HasComment("单位编号"); + + b.Property("EndTime") + .HasColumnType("date") + .HasColumnName("end_time") + .HasComment("结束日期"); + + b.Property("IsComplete") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_complete") + .HasComment("完成标志"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MedicalTimes") + .HasColumnType("smallint") + .HasColumnName("medical_times") + .HasComment("单位体检次数"); + + b.Property("RegisterName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("register_name"); + + b.Property("RegisterNo") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("register_no"); + + b.HasKey("Id"); + + b.HasIndex("CustomerOrgId"); + + b.ToTable("customer_org_register"); + + b.HasComment("团检体检登记"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_org_type") + .IsUnique(); + + b.ToTable("customer_org_type"); + + b.HasComment("团体类型设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Department", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CodePrefix") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("code_prefix"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DepartmentTypeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("department_type_flag"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasMaxLength(4) + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength(); + + b.Property("PathCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("path_code"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName", "ParentId" }, "ix_department") + .IsUnique(); + + b.ToTable("department"); + + b.HasComment("部门"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DeviceType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("仪器类别编号"); + + b.Property("CheckTypeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("check_type_flag"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("仪器类别名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.ToTable("device_type"); + + b.HasComment("仪器类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Diagnosis", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DiagnosisLevelId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_level_id"); + + b.Property("DisplayName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar"); + + b.Property("IsIll") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_ill"); + + b.Property("IsSummaryTemplate") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_summary_template"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("simple_code"); + + b.Property("SuggestionName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("suggestion_name"); + + b.HasKey("Id"); + + b.HasIndex("DiagnosisLevelId"); + + b.HasIndex("ItemTypeId"); + + b.ToTable("diagnosis"); + + b.HasComment("诊断设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisLevel", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.ToTable("diagnosis_level"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisPostfix", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_diagnosis_postfix") + .IsUnique(); + + b.ToTable("diagnosis_postfix"); + + b.HasComment("诊断后缀设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_diagnosis_template") + .IsUnique(); + + b.ToTable("diagnosis_template"); + + b.HasComment("诊断模板设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisTemplateDetail", b => + { + b.Property("DiagnosisTemplateId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_template_id") + .IsFixedLength(); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength(); + + b.HasKey("DiagnosisTemplateId", "DiagnosisId") + .HasName("pk_diagnosis_template_detail"); + + b.HasIndex("DiagnosisId"); + + b.ToTable("diagnosis_template_detail"); + + b.HasComment("诊断模板包含明细"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength(); + + b.Property("PathCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("path_code"); + + b.HasKey("Id"); + + b.ToTable("diagnosis_type"); + + b.HasComment("诊断类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.FollowUpMode", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("smallint") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("follow_up_mode"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.FollowUpPlan", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Content") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("content"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CycleDays") + .HasColumnType("smallint") + .HasColumnName("cycle_days"); + + b.Property("DoctorUserId") + .HasColumnType("uuid") + .HasColumnName("doctor_user_id"); + + b.Property("FollowUpModeId") + .HasColumnType("uuid") + .HasColumnName("follow_up_mode_id") + .IsFixedLength(); + + b.Property("FollowUpTypeId") + .HasColumnType("uuid") + .HasColumnName("follow_up_type_id") + .IsFixedLength(); + + b.Property("IsLoop") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_loop"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PerfomFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("perfom_flag"); + + b.Property("PerfomTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("perfom_time"); + + b.Property("PerfomUserId") + .HasColumnType("uuid") + .HasColumnName("perfom_user_id"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark"); + + b.HasKey("Id"); + + b.ToTable("follow_up_plan"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.FollowUpType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("smallint") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("follow_up_type"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ForSex", b => + { + b.Property("Id") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("id"); + + b.Property("DisplayName") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("SimpleCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("for_sex"); + + b.HasComment("可支持性别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Grouping", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ModifiedDate") + .HasColumnType("date") + .HasColumnName("modified_date"); + + b.Property("Modifier") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("modifier"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_grouping") + .IsUnique(); + + b.ToTable("grouping"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.GuideType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("guide_type"); + + b.HasComment("指引类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.HealthCertificate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("登记流水号"); + + b.Property("CertificateDate") + .HasColumnType("date") + .HasColumnName("certificate_date") + .HasComment("发证日期"); + + b.Property("CertificateNo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("certificate_no") + .HasComment("证件编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ServiceOrg") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("service_org") + .HasComment("服务单位"); + + b.Property("ServiceTradesId") + .HasColumnType("smallint") + .HasColumnName("service_trades_id") + .HasComment("服务行业"); + + b.HasKey("Id"); + + b.ToTable("health_certificate"); + + b.HasComment("健康证办理"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ImportLisResult", b => + { + b.Property("LisRequestNo") + .HasColumnType("uuid") + .HasColumnName("lis_request_no") + .HasComment("条码号"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .HasComment("项目"); + + b.Property("CheckDoctorName") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("check_doctor_name") + .HasComment("检查医生"); + + b.Property("CheckTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("check_time") + .HasComment("检查日期"); + + b.Property("CriticalRangeValue") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("critical_range_value"); + + b.Property("ImportTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("import_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)") + .HasComment("导入日期"); + + b.Property("ItemName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("item_name"); + + b.Property("PatientRegisterNo") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("patient_register_no") + .HasComment("条码号"); + + b.Property("ReferenceRangeValue") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("reference_range_value") + .HasComment("参考范围"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("ReportPrompt") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("report_prompt") + .HasComment("报告单提示"); + + b.Property("Result") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("result") + .HasComment("结果"); + + b.Property("Unit") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("unit") + .HasComment("单位"); + + b.HasKey("LisRequestNo", "ItemId") + .HasName("pk_import_lis_result"); + + b.HasIndex(new[] { "PatientRegisterNo" }, "ix_import_lis_result"); + + b.ToTable("import_lis_result"); + + b.HasComment("检验结果中间表"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ImportPacsPicture", b => + { + b.Property("CheckRequestNo") + .HasColumnType("uuid") + .HasColumnName("check_request_no"); + + b.Property("PictureFilename") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("picture_filename") + .HasComment("检查部位"); + + b.Property("AsbitemNames") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("asbitem_names") + .HasComment("组合项目名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("诊断结论"); + + b.Property("ImportTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("import_time") + .HasComment("导入日期"); + + b.Property("IsPrint") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_print") + .HasComment("检查所见"); + + b.Property("PatientRegisterNo") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("patient_register_no"); + + b.HasKey("CheckRequestNo", "PictureFilename") + .HasName("pk_import_pacs_picture_1"); + + b.ToTable("import_pacs_picture"); + + b.HasComment("pacs图片中间表"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ImportPacsResult", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AsbitemNames") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("asbitem_names") + .HasComment("组合项目名称"); + + b.Property("CheckDoctorName") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("check_doctor_name") + .HasComment("检查医生"); + + b.Property("CheckItems") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("check_items") + .HasComment("检查部位"); + + b.Property("CheckTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("check_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)") + .HasComment("检查日期"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("character varying(1000)") + .HasColumnName("description") + .HasComment("检查所见"); + + b.Property("ImportTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("import_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)") + .HasComment("导入日期"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PatientRegisterNo") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("patient_register_no"); + + b.Property("Suggestion") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("suggestion") + .HasComment("建议"); + + b.Property("Summary") + .HasMaxLength(1000) + .HasColumnType("character varying(1000)") + .HasColumnName("summary") + .HasComment("诊断结论"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "PatientRegisterNo" }, "ix_import_pacs_result"); + + b.ToTable("import_pacs_result"); + + b.HasComment("PACS结果中间表"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.InvoiceItemType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_invoice_item_type") + .IsUnique(); + + b.ToTable("invoice_item_type"); + + b.HasComment("发票项目类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.InvoiceOrg", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_invoice_org") + .IsUnique(); + + b.ToTable("invoice_org"); + + b.HasComment("发票单位设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Item", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CalculationFunction") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("calculation_function"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DefaultResult") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("default_result"); + + b.Property("DiagnosisFunction") + .HasMaxLength(2000) + .HasColumnType("character varying(2000)") + .HasColumnName("diagnosis_function"); + + b.Property("DisplayName") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("EnglishShortName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("english_short_name"); + + b.Property("InputCheck") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("input_check"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active"); + + b.Property("IsCalculationItem") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_calculation_item"); + + b.Property("IsContinueProcess") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_continue_process"); + + b.Property("IsDiagnosisFunction") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_diagnosis_function"); + + b.Property("IsNameIntoSummary") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_name_into_summary"); + + b.Property("IsProduceSummary") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_produce_summary"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price"); + + b.Property("PriceItemId") + .HasMaxLength(8) + .HasColumnType("uuid") + .HasColumnName("price_item_id") + .IsFixedLength(); + + b.Property("ReferenceRangeTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("reference_range_type_flag") + .HasDefaultValueSql("'E'::bpchar"); + + b.Property("ResultTemplateTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("result_template_type_flag") + .HasDefaultValueSql("0"); + + b.Property("SimpleCode") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("simple_code"); + + b.Property("UnitId") + .HasColumnType("uuid") + .HasColumnName("unit_id") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("ItemTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_item") + .IsUnique(); + + b.ToTable("item"); + + b.HasComment("项目设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemDefaultResult", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_item_default_result") + .IsUnique(); + + b.ToTable("item_default_result"); + + b.HasComment("项目默认结果设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultMatch", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("结果匹配编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength() + .HasComment("诊断编号"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1") + .HasComment("显示顺序"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Result") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("result") + .HasComment("结果"); + + b.HasKey("Id"); + + b.HasIndex("DiagnosisId"); + + b.HasIndex("ItemId"); + + b.ToTable("item_result_match"); + + b.HasComment("结果匹配设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("结果模板编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength() + .HasComment("诊断编号"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("IsNameIntoSummary") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_name_into_summary") + .HasComment("小结前是否加名称"); + + b.Property("IsResultIntoSummary") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_result_into_summary"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Result") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("result") + .HasComment("结果"); + + b.Property("ResultStatusId") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("result_status_id") + .HasComment("结果状态"); + + b.Property("SimpleCode") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("simple_code") + .HasComment("拼音简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "ItemId", "Result" }, "ix_item_result_template") + .IsUnique(); + + b.ToTable("item_result_template"); + + b.HasComment("项目结果模板设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultTemplateType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "ItemId", "DisplayName" }, "ix_item_result_template_type") + .IsUnique(); + + b.ToTable("item_result_template_type"); + + b.HasComment("项目结果模板类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_item_template") + .IsUnique(); + + b.ToTable("item_template"); + + b.HasComment("项目模板设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemTemplateDetail", b => + { + b.Property("ItemTemplateId") + .HasColumnType("uuid") + .HasColumnName("item_template_id") + .IsFixedLength(); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength(); + + b.HasKey("ItemTemplateId", "ItemId") + .HasName("pk_item_template_detail"); + + b.HasIndex("ItemId"); + + b.ToTable("item_template_detail"); + + b.HasComment("项目模板明细"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CheckTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("check_type_flag") + .HasDefaultValueSql("'G'::bpchar"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("GuidTypeId") + .HasColumnType("uuid") + .HasColumnName("guid_type_id") + .IsFixedLength(); + + b.Property("IsMergeAsbitem") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_merge_asbitem"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MedicalReportTypeId") + .HasColumnType("uuid") + .HasColumnName("medical_report_type_id") + .IsFixedLength(); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength(); + + b.Property("PathCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("path_code"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("GuidTypeId"); + + b.HasIndex("MedicalReportTypeId"); + + b.HasIndex(new[] { "DisplayName", "ParentId" }, "ix_item_type") + .IsUnique(); + + b.ToTable("item_type"); + + b.HasComment("项目类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.LisRequest", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("IsPrint") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_print"); + + b.Property("IsSignIn") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_sign_in"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LisRequestNo") + .HasColumnType("uuid") + .HasColumnName("lis_request_no"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("SampleContainerId") + .HasColumnType("uuid") + .HasColumnName("sample_container_id") + .IsFixedLength(); + + b.Property("SampleTypeId") + .HasColumnType("uuid") + .HasColumnName("sample_type_id") + .IsFixedLength(); + + b.Property("Sampler") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("sampler"); + + b.Property("SamplingTime") + .HasColumnType("date") + .HasColumnName("sampling_time"); + + b.Property("SignInOrder") + .HasColumnType("integer") + .HasColumnName("sign_in_order"); + + b.Property("SignInPerson") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("sign_in_person"); + + b.Property("SignInTime") + .HasColumnType("date") + .HasColumnName("sign_in_time"); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.HasIndex("SampleContainerId"); + + b.HasIndex("SampleTypeId"); + + b.HasIndex(new[] { "LisRequestNo" }, "ix_lis_request") + .IsUnique(); + + b.ToTable("lis_request"); + + b.HasComment("检验申请单"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MaritalStatus", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("id") + .HasDefaultValueSql("'0'::bpchar") + .HasComment("婚姻状况编号"); + + b.Property("DisplayName") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("display_name") + .HasComment("婚姻状况名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("SimpleCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_marital_status") + .IsUnique(); + + b.ToTable("marital_status"); + + b.HasComment("婚姻状况设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalConclusion", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("体检结论编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("体检结论名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MedicalConclusionTypeId") + .HasMaxLength(2) + .HasColumnType("character(2)") + .HasColumnName("medical_conclusion_type_id") + .IsFixedLength(); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex("MedicalConclusionTypeId"); + + b.ToTable("medical_conclusion"); + + b.HasComment("体检结论设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalConclusionType", b => + { + b.Property("Id") + .HasMaxLength(2) + .HasColumnType("character(2)") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_medical_conclusion_type") + .IsUnique(); + + b.ToTable("medical_conclusion_type"); + + b.HasComment("体检结论类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalPackage", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("套餐主档编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1") + .HasComment("显示顺序"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar") + .HasComment("适用性别"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active") + .HasComment("启用标志"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price") + .HasComment("价格"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_medical_package") + .IsUnique(); + + b.ToTable("medical_package"); + + b.HasComment("体检套餐主档设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalPackageDetail", b => + { + b.Property("MedicalPackageId") + .HasColumnType("uuid") + .HasColumnName("medical_package_id") + .IsFixedLength(); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength(); + + b.HasKey("MedicalPackageId", "AsbitemId") + .HasName("pk_medical_package_detail"); + + b.HasIndex("AsbitemId"); + + b.ToTable("medical_package_detail"); + + b.HasComment("体检套餐包含的组合项目设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalReportType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("medical_report_type"); + + b.HasComment("体检报告类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("体检类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("体检类别名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_medical_type") + .IsUnique(); + + b.ToTable("medical_type"); + + b.HasComment("体检类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Nation", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("CountryCode") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("country_code"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("拼音简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_nation") + .IsUnique(); + + b.ToTable("nation"); + + b.HasComment("民族设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.OcCheckType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("职业病检查类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OcCheckTypeName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("oc_check_type_name") + .HasComment("职业病检查类别名称"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("oc_check_type"); + + b.HasComment("职业病检查类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.OperateLog", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ComputerName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("computer_name"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OperateContent") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("operate_content"); + + b.Property("OperateTime") + .HasColumnType("date") + .HasColumnName("operate_time"); + + b.Property("OperateType") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("operate_type"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark"); + + b.Property("Sqlsyntax") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("sqlsyntax"); + + b.Property("TableName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("table_name"); + + b.Property("UserId") + .HasMaxLength(16) + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("WindowName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("window_name"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "ComputerName" }, "ix_operate_log"); + + b.HasIndex(new[] { "WindowName" }, "ix_operate_log_1"); + + b.ToTable("operate_log"); + + b.HasComment("操作日志"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.OrganizationUnitsCustomerOrg", b => + { + b.Property("CustomerOrgId") + .HasColumnType("uuid") + .HasColumnName("customer_org_id") + .IsFixedLength(); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id") + .IsFixedLength(); + + b.HasKey("CustomerOrgId", "OrganizationUnitId") + .HasName("pk_medical_center_org"); + + b.HasIndex("OrganizationUnitId"); + + b.ToTable("organization_units_customer_org"); + + b.HasComment("体检中心单位权限"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Patient", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Address") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("address"); + + b.Property("BirthDate") + .HasColumnType("date") + .HasColumnName("birth_date"); + + b.Property("BirthPlaceId") + .HasColumnType("uuid") + .HasColumnName("birth_place_id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("display_name"); + + b.Property("Email") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("email"); + + b.Property("IdNo") + .HasMaxLength(18) + .HasColumnType("character varying(18)") + .HasColumnName("id_no"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MaritalStatusId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("marital_status_id"); + + b.Property("MobileTelephone") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("mobile_telephone"); + + b.Property("NationId") + .HasColumnType("uuid") + .HasColumnName("nation_id") + .IsFixedLength(); + + b.Property("PatientNo") + .HasColumnType("text"); + + b.Property("PatientPassword") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("patient_password"); + + b.Property("PostalCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("postal_code"); + + b.Property("SexId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("sex_id"); + + b.Property("Telephone") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("telephone"); + + b.HasKey("Id"); + + b.HasIndex("PatientNo") + .IsUnique(); + + b.HasIndex(new[] { "IdNo" }, "ix_patient"); + + b.HasIndex(new[] { "DisplayName" }, "ix_patient_1"); + + b.ToTable("patient"); + + b.HasComment("体检人员档案"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientOccupationalDisease", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AbnormalTimes") + .HasColumnType("integer") + .HasColumnName("abnormal_times"); + + b.Property("AbortionTimes") + .HasColumnType("integer") + .HasColumnName("abortion_times"); + + b.Property("ChildrenNum") + .HasColumnType("integer") + .HasColumnName("children_num"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DiagnosisDate") + .HasColumnType("date") + .HasColumnName("diagnosis_date"); + + b.Property("DiagnosisHospital") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("diagnosis_hospital"); + + b.Property("DrinkFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("drink_flag"); + + b.Property("DrinkNum") + .HasColumnType("integer") + .HasColumnName("drink_num"); + + b.Property("DrinkYears") + .HasColumnType("integer") + .HasColumnName("drink_years"); + + b.Property("FirstMenstruation") + .HasColumnType("integer") + .HasColumnName("first_menstruation"); + + b.Property("HandleSuggestion") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("handle_suggestion"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MenstrualHistory") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("menstrual_history"); + + b.Property("MenstruationCycle") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("menstruation_cycle"); + + b.Property("MenstruationEndAge") + .HasColumnType("integer") + .HasColumnName("menstruation_end_age"); + + b.Property("MenstruationFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("menstruation_flag"); + + b.Property("MenstruationTimeLength") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("menstruation_time_length"); + + b.Property("NoOccupAbSuggestion") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("no_occup_ab_suggestion"); + + b.Property("NoOccupationalAbnormal") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("no_occupational_abnormal"); + + b.Property("OcCheckTypeId") + .HasColumnType("uuid") + .HasColumnName("oc_check_type_id") + .IsFixedLength(); + + b.Property("OccupationalAbSuggestion") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("occupational_ab_suggestion"); + + b.Property("OccupationalAbnormal") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("occupational_abnormal"); + + b.Property("OccupationalDisease") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("occupational_disease"); + + b.Property("Other") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("other"); + + b.Property("PoisonWorkTime") + .HasMaxLength(6) + .HasColumnType("character varying(6)") + .HasColumnName("poison_work_time"); + + b.Property("PrematureBirthTimes") + .HasColumnType("integer") + .HasColumnName("premature_birth_times"); + + b.Property("PreviousHistory") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("previous_history"); + + b.Property("Recovery") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("recovery"); + + b.Property("SmokeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("smoke_flag"); + + b.Property("SmokeNum") + .HasColumnType("integer") + .HasColumnName("smoke_num"); + + b.Property("SmokeYears") + .HasColumnType("integer") + .HasColumnName("smoke_years"); + + b.Property("StillbirthTimes") + .HasColumnType("integer") + .HasColumnName("stillbirth_times"); + + b.Property("TotalWorkTime") + .HasMaxLength(6) + .HasColumnType("character varying(6)") + .HasColumnName("total_work_time"); + + b.HasKey("Id"); + + b.ToTable("patient_occupational_disease"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientOccupationalHistory", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("BeginDate") + .HasColumnType("date") + .HasColumnName("begin_date"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("EndDate") + .HasColumnType("date") + .HasColumnName("end_date"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Org") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("org"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("Poison") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("poison"); + + b.Property("ProtectiveMeasures") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("protective_measures"); + + b.Property("WorkShop") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("work_shop"); + + b.Property("WorkType") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("work_type"); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.ToTable("patient_occupational_history"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientPoison", b => + { + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("PoisonId") + .HasColumnType("uuid") + .HasColumnName("poison_id") + .IsFixedLength(); + + b.HasKey("PatientRegisterId", "PoisonId") + .HasName("pk_patient_poison"); + + b.HasIndex("PoisonId"); + + b.ToTable("patient_poison"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientRegister", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("登记流水号"); + + b.Property("Age") + .HasColumnType("smallint") + .HasColumnName("age") + .HasComment("年龄"); + + b.Property("AuditDate") + .HasColumnType("date") + .HasColumnName("audit_date"); + + b.Property("AuditDoctor") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("audit_doctor"); + + b.Property("BirthDate") + .HasColumnType("date") + .HasColumnName("birth_date"); + + b.Property("CompleteFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("complete_flag") + .HasDefaultValueSql("'0'::bpchar") + .HasComment("完成标志"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgGroupId") + .HasColumnType("uuid") + .HasColumnName("customer_org_group_id") + .IsFixedLength() + .HasComment("分组"); + + b.Property("CustomerOrgId") + .HasColumnType("uuid") + .HasColumnName("customer_org_id") + .IsFixedLength() + .HasComment("单位编号"); + + b.Property("CustomerOrgRegisterId") + .HasColumnType("uuid") + .HasColumnName("customer_org_register_id"); + + b.Property("GuidePrintTimes") + .HasColumnType("smallint") + .HasColumnName("guide_print_times"); + + b.Property("InterposeMeasure") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("interpose_measure") + .HasComment("干预措施"); + + b.Property("IsAudit") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_audit"); + + b.Property("IsLock") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_lock"); + + b.Property("IsMedicalStart") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_medical_start") + .HasComment("体检开始标志"); + + b.Property("IsNameHide") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_name_hide"); + + b.Property("IsPhoneFollow") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_phone_follow"); + + b.Property("IsRecoverGuide") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_recover_guide"); + + b.Property("IsUpload") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_upload"); + + b.Property("IsVip") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_vip"); + + b.Property("JobCardNo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("job_card_no") + .HasComment("工卡号"); + + b.Property("JobPost") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("job_post") + .HasComment("职务"); + + b.Property("JobTitle") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("job_title") + .HasComment("职称"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MaritalStatusId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("marital_status_id") + .HasDefaultValueSql("'0'::bpchar") + .HasComment("婚姻状况"); + + b.Property("MedicalCardNo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("medical_card_no"); + + b.Property("MedicalConclusionId") + .HasColumnType("uuid") + .HasColumnName("medical_conclusion_id") + .IsFixedLength() + .HasComment("体检结论"); + + b.Property("MedicalPackageId") + .HasColumnType("uuid") + .HasColumnName("medical_package_id") + .IsFixedLength() + .HasComment("套餐"); + + b.Property("MedicalStartDate") + .ValueGeneratedOnAdd() + .HasColumnType("date") + .HasColumnName("medical_start_date") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)") + .HasComment("体检开始日期"); + + b.Property("MedicalTimes") + .HasColumnType("smallint") + .HasColumnName("medical_times") + .HasComment("体检次数"); + + b.Property("MedicalTypeId") + .HasColumnType("uuid") + .HasColumnName("medical_type_id") + .IsFixedLength() + .HasComment("体检类别"); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id"); + + b.Property("PatientId") + .HasMaxLength(10) + .HasColumnType("uuid") + .HasColumnName("patient_id") + .HasComment("档案号"); + + b.Property("PatientName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("patient_name") + .HasComment("姓名"); + + b.Property("PatientRegisterNo") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("patient_register_no") + .HasComment("条码号"); + + b.Property("PersonnelTypeId") + .HasColumnType("uuid") + .HasColumnName("personnel_type_id") + .IsFixedLength() + .HasComment("人员类别"); + + b.Property("Photo") + .HasColumnType("bytea") + .HasColumnName("photo") + .HasComment("照片"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark"); + + b.Property("ReportPrintTimes") + .HasColumnType("smallint") + .HasColumnName("report_print_times") + .HasComment("体检报告打印次数"); + + b.Property("Salesman") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("salesman") + .HasComment("介绍人"); + + b.Property("SexHormoneTermId") + .HasColumnType("uuid") + .HasColumnName("sex_hormone_term_id") + .IsFixedLength(); + + b.Property("SexId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("sex_id") + .HasComment("性别"); + + b.Property("SummaryDate") + .HasColumnType("date") + .HasColumnName("summary_date") + .HasComment("总检日期"); + + b.Property("SummaryDoctor") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("summary_doctor") + .HasComment("总检医生"); + + b.Property("ThirdInfo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("third_info"); + + b.HasKey("Id"); + + b.HasIndex("MaritalStatusId"); + + b.HasIndex(new[] { "CustomerOrgRegisterId" }, "fki_fk_patient_register_org_register"); + + b.HasIndex(new[] { "OrganizationUnitId" }, "fki_fk_patient_register_ororganization_unit"); + + b.HasIndex(new[] { "PatientRegisterNo" }, "ix_patient_register") + .IsUnique(); + + b.HasIndex(new[] { "PatientId", "MedicalTimes" }, "ix_patient_register_1") + .IsUnique(); + + b.HasIndex(new[] { "PatientName" }, "ix_patient_register_2"); + + b.ToTable("patient_register"); + + b.HasComment("体检登记主档"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientSymptom", b => + { + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("SymptomId") + .HasColumnType("uuid") + .HasColumnName("symptom_id") + .IsFixedLength(); + + b.Property("Degree") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("degree"); + + b.Property("TimeLength") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("time_length"); + + b.HasKey("PatientRegisterId", "SymptomId") + .HasName("pk_patient_symptom"); + + b.HasIndex("SymptomId"); + + b.ToTable("patient_symptom"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PayMode", b => + { + b.Property("Id") + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_payment_mode") + .IsUnique(); + + b.ToTable("pay_mode"); + + b.HasComment("支付方式设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PersonnelType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("人员类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("人员类别名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_personnel_type") + .IsUnique(); + + b.ToTable("personnel_type"); + + b.HasComment("人员类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PhoneFollow", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("FollowContent") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("follow_content"); + + b.Property("FollowUpPlanId") + .HasColumnType("uuid") + .HasColumnName("follow_up_plan_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("ReplyContent") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("reply_content"); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.ToTable("phone_follow"); + + b.HasComment("电话随访"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Poison", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("毒害编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("毒害名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PoisonTypeId") + .HasColumnType("uuid") + .HasColumnName("poison_type_id") + .IsFixedLength(); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("PoisonTypeId"); + + b.ToTable("poison"); + + b.HasComment("毒害因素设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PoisonType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("毒害类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("毒害类别名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("poison_type"); + + b.HasComment("毒害因素类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PositionType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("职务编号"); + + b.Property("CreationTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("职务名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime") + .HasComment("最后修改日期"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId") + .HasComment("最后修改者"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_position_type") + .IsUnique(); + + b.ToTable("position_type"); + + b.HasComment("职务类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PriceItem", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("InvoiceItemTypeId") + .HasColumnType("uuid") + .HasColumnName("invoice_item_type_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price"); + + b.Property("PriceItemCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("price_item_code"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("InvoiceItemTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_price_item") + .IsUnique(); + + b.ToTable("price_item"); + + b.HasComment("价表项目设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PrimarykeyBuilder", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("主键编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DateString") + .HasMaxLength(8) + .HasColumnType("character(8)") + .HasColumnName("date_string") + .IsFixedLength() + .HasComment("日期"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SerialNo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("serial_no") + .HasComment("序列号"); + + b.HasKey("Id"); + + b.ToTable("primarykey_builder"); + + b.HasComment("主键产生器"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.QueueRegister", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CallTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("call_time"); + + b.Property("CompleteFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("complete_flag") + .HasDefaultValueSql("0"); + + b.Property("CreationTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("NoCompleteReason") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("no_complete_reason") + .HasDefaultValueSql("0"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("RoomId") + .HasColumnType("uuid") + .HasColumnName("room_id") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.ToTable("queue_register"); + + b.HasComment("排队登记"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ReferenceRange", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("参考范围编号"); + + b.Property("AgeLowerLimit") + .HasColumnType("smallint") + .HasColumnName("age_lower_limit") + .HasComment("年龄下限"); + + b.Property("AgeUpperLimit") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasColumnName("age_upper_limit") + .HasDefaultValueSql("200") + .HasComment("年龄上限"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CriticalRangeValue") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("critical_range_value"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar") + .HasComment("性别"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LowerDiagnosisId") + .HasColumnType("uuid") + .HasColumnName("lower_diagnosis_id") + .IsFixedLength() + .HasComment("偏低诊断"); + + b.Property("ReferenceRangeTypeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("reference_range_type_flag"); + + b.Property("ReferenceRangeValue") + .HasMaxLength(150) + .HasColumnType("character varying(150)") + .HasColumnName("reference_range_value"); + + b.Property("UpperDiagnosisId") + .HasColumnType("uuid") + .HasColumnName("upper_diagnosis_id") + .IsFixedLength() + .HasComment("偏高诊断"); + + b.HasKey("Id"); + + b.HasIndex("ItemId"); + + b.ToTable("reference_range"); + + b.HasComment("项目参考范围设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterAsbitem", b => + { + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id"); + + b.Property("AsbitemId") + .HasMaxLength(6) + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength() + .HasComment("组合项目"); + + b.Property("Amount") + .HasColumnType("smallint") + .HasColumnName("amount"); + + b.Property("ChargePrice") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_price") + .HasComment("实收价格"); + + b.Property("IsCharge") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_charge") + .HasComment("是否已收费"); + + b.Property("LisRequestId") + .HasMaxLength(20) + .HasColumnType("uuid") + .HasColumnName("lis_request_id"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("登记流水号"); + + b.Property("PayTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("pay_type_flag") + .HasDefaultValueSql("0") + .HasComment("支付方式,比如是自费、免费、单位支付"); + + b.Property("RegisterAsbitemId") + .HasColumnType("uuid") + .HasColumnName("register_asbitem_id"); + + b.Property("StandardPrice") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("standard_price") + .HasComment("标准价格"); + + b.HasKey("RegisterCheckId", "AsbitemId") + .HasName("pk_register_asbitem"); + + b.HasIndex("AsbitemId"); + + b.HasIndex(new[] { "PatientRegisterId", "AsbitemId" }, "ix_register_asbitem") + .IsUnique(); + + b.ToTable("register_asbitem"); + + b.HasComment("检查组合项目记录"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheck", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AuditTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("audit_time"); + + b.Property("AuditorUserId") + .HasColumnType("uuid") + .HasColumnName("auditor_user_id"); + + b.Property("CheckDate") + .HasColumnType("date") + .HasColumnName("check_date"); + + b.Property("CheckDoctorId") + .HasColumnType("uuid") + .HasColumnName("check_doctor_id"); + + b.Property("CheckRequestNo") + .HasMaxLength(20) + .HasColumnType("uuid") + .HasColumnName("check_request_no"); + + b.Property("CheckRequestPrintTimes") + .HasColumnType("smallint") + .HasColumnName("check_request_print_times"); + + b.Property("CompleteFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("complete_flag") + .HasDefaultValueSql("0"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CriticalValue") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("critical_value"); + + b.Property("CriticalValueCreateDate") + .HasColumnType("date") + .HasColumnName("critical_value_create_date"); + + b.Property("CriticalValueFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("critical_value_flag") + .HasDefaultValueSql("0"); + + b.Property("CriticalValueProcessContent") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("critical_value_process_content"); + + b.Property("CriticalValueProcessDate") + .HasColumnType("date") + .HasColumnName("critical_value_process_date"); + + b.Property("CriticalValueProcessDoctor") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("critical_value_process_doctor"); + + b.Property("CriticalValueProcessFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("critical_value_process_flag"); + + b.Property("IsAudit") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_audit"); + + b.Property("IsLock") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_lock"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ThirdInfo") + .HasMaxLength(80) + .HasColumnType("character varying(80)") + .HasColumnName("third_info"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "CheckRequestNo" }, "ix_register_check_1"); + + b.ToTable("register_check"); + + b.HasComment("登记检查单"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckCriticalValue", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CriticalValue") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("critical_value"); + + b.Property("Doctor") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("doctor"); + + b.Property("IsComplete") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_complete"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ProcessTypeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("process_type_flag"); + + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id"); + + b.HasKey("Id"); + + b.ToTable("register_check_critical_value"); + + b.HasComment("检查危急值"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckItem", b => + { + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目"); + + b.Property("CheckDate") + .HasColumnType("date") + .HasColumnName("check_date") + .HasComment("检查日期"); + + b.Property("CheckDoctorName") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("check_doctor_name") + .HasComment("检查医生"); + + b.Property("CriticalRangeValue") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("critical_range_value"); + + b.Property("CriticalValue") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("critical_value"); + + b.Property("ReferenceRangeValue") + .ValueGeneratedOnAdd() + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("reference_range_value") + .HasDefaultValueSql("''::character varying") + .HasComment("参考范围"); + + b.Property("Result") + .HasMaxLength(1000) + .HasColumnType("character varying(1000)") + .HasColumnName("result") + .HasComment("结果"); + + b.Property("ResultStatusId") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("result_status_id") + .HasComment("报告单提示"); + + b.Property("Unit") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("unit"); + + b.HasKey("RegisterCheckId", "ItemId") + .HasName("pk_register_item_1"); + + b.HasIndex("ItemId"); + + b.HasIndex("ResultStatusId"); + + b.ToTable("register_check_item"); + + b.HasComment("检查明细项目记录"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckPicture", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("检查图片编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1") + .HasComment("显示顺序"); + + b.Property("IsPrint") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_print") + .HasComment("打印标志"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PictureFilename") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("picture_filename") + .HasComment("图片名"); + + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id") + .HasComment("登记流水号"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "RegisterCheckId", "PictureFilename" }, "ix_check_picture") + .IsUnique(); + + b.ToTable("register_check_picture"); + + b.HasComment("体检登记组合项目图片"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckSuggestion", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id"); + + b.Property("Suggestion") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("suggestion"); + + b.HasKey("Id"); + + b.HasIndex("RegisterCheckId"); + + b.ToTable("register_check_suggestion"); + + b.HasComment("登记检查建议"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckSummary", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id"); + + b.Property("Summary") + .HasMaxLength(500) + .HasColumnType("character varying(500)") + .HasColumnName("summary"); + + b.Property("SummaryFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("summary_flag"); + + b.HasKey("Id"); + + b.HasIndex("RegisterCheckId"); + + b.ToTable("register_check_summary"); + + b.HasComment("登记检查综述"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ResultStatus", b => + { + b.Property("Id") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("id"); + + b.Property("DataInputBackgroundColor") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("data_input_background_color") + .HasDefaultValueSql("16777215"); + + b.Property("DataInputFontColor") + .HasColumnType("integer") + .HasColumnName("data_input_font_color"); + + b.Property("DataInputPrompt") + .HasMaxLength(8) + .HasColumnType("character varying(8)") + .HasColumnName("data_input_prompt"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("ReportBackgroundColor") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("report_background_color") + .HasDefaultValueSql("16777215"); + + b.Property("ReportFontColor") + .HasColumnType("integer") + .HasColumnName("report_font_color"); + + b.Property("ReportPrompt") + .HasMaxLength(8) + .HasColumnType("character varying(8)") + .HasColumnName("report_prompt"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_result_status") + .IsUnique(); + + b.ToTable("result_status"); + + b.HasComment("结果状态设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Room", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DepartmentId") + .HasColumnType("uuid") + .HasColumnName("department_id") + .IsFixedLength(); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("RoomTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("room_type_flag") + .HasDefaultValueSql("0"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("DepartmentId"); + + b.HasIndex("ItemTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_room") + .IsUnique(); + + b.ToTable("room"); + + b.HasComment("房间设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleContainer", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("ContainerColor") + .HasColumnType("integer") + .HasColumnName("container_color"); + + b.Property("ContainerColorName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("container_color_name"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_sample_container") + .IsUnique(); + + b.ToTable("sample_container"); + + b.HasComment("标本容器设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleGroup", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SampleContainerId") + .HasColumnType("uuid") + .HasColumnName("sample_container_id") + .IsFixedLength(); + + b.Property("SampleTypeId") + .HasColumnType("uuid") + .HasColumnName("sample_type_id") + .IsFixedLength(); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("SampleContainerId"); + + b.HasIndex("SampleTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_sample_group") + .IsUnique(); + + b.ToTable("sample_group"); + + b.HasComment("标本分组设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleGroupDetail", b => + { + b.Property("SampleGroupId") + .HasColumnType("uuid") + .HasColumnName("sample_group_id") + .IsFixedLength(); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength(); + + b.HasKey("SampleGroupId", "AsbitemId") + .HasName("pk_sample_group_detail"); + + b.HasIndex(new[] { "AsbitemId" }, "ix_sample_group_detail") + .IsUnique(); + + b.ToTable("sample_group_detail"); + + b.HasComment("标本分组包含组合项目设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_sample_type"); + + b.ToTable("sample_type"); + + b.HasComment("标本类型设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ServiceTrade", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DepartmentId") + .HasColumnType("uuid") + .HasColumnName("department_id") + .IsFixedLength(); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("ValidPeriod") + .HasColumnType("smallint") + .HasColumnName("valid_period") + .HasComment("有效期"); + + b.Property("ValidPeriodDisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("valid_period_display_name"); + + b.Property("ValidPeriodUnit") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("valid_period_unit"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DepartmentId", "DisplayName" }, "ix_service_trades") + .IsUnique(); + + b.ToTable("service_trades"); + + b.HasComment("服务行业设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SettleAccount", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CompletedBy") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("completed_by"); + + b.Property("CompletedTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("completed_time"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("IsComplete") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_complete"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.ToTable("settle_account"); + + b.HasComment("结账"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Sex", b => + { + b.Property("Id") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("id"); + + b.Property("DisplayName") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("SimpleCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("sex"); + + b.HasComment("性别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SexHormoneReferenceRange", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("AgeLowerLimit") + .HasColumnType("smallint") + .HasColumnName("age_lower_limit"); + + b.Property("AgeUpperLimit") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasColumnName("age_upper_limit") + .HasDefaultValueSql("200"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CriticalRangeValue") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("critical_range_value"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LowerDiagnosisId") + .HasColumnType("uuid") + .HasColumnName("lower_diagnosis_id") + .IsFixedLength(); + + b.Property("ReferenceRangeValue") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("reference_range_value"); + + b.Property("SexHormoneTermId") + .HasColumnType("uuid") + .HasColumnName("sex_hormone_term_id") + .IsFixedLength(); + + b.Property("UpperDiagnosisId") + .HasColumnType("uuid") + .HasColumnName("upper_diagnosis_id") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("ItemId"); + + b.HasIndex("SexHormoneTermId"); + + b.ToTable("sex_hormone_reference_range"); + + b.HasComment("性激素参考范围设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SexHormoneTerm", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_sex_hormone_term") + .IsUnique(); + + b.ToTable("sex_hormone_term"); + + b.HasComment("性激素期限设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SmsSend", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Content") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("content"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("FollowUpPlanId") + .HasColumnType("uuid") + .HasColumnName("follow_up_plan_id"); + + b.Property("IsComplete") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_complete"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MobileTelephone") + .HasMaxLength(11) + .HasColumnType("character varying(11)") + .HasColumnName("mobile_telephone"); + + b.Property("PatientId") + .HasMaxLength(10) + .HasColumnType("uuid") + .HasColumnName("patient_id"); + + b.Property("PatientName") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("patient_name"); + + b.Property("SmsTypeId") + .HasColumnType("uuid") + .HasColumnName("sms_type_id") + .IsFixedLength(); + + b.HasKey("Id"); + + b.ToTable("sms_send"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SmsTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("Content") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("content"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("smallint") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("SmsTypeId") + .HasColumnType("uuid") + .HasColumnName("sms_type_id") + .IsFixedLength(); + + b.HasKey("Id"); + + b.ToTable("sms_template"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SmsType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("smallint") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("sms_type"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Suggestion", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength(); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SuggestionContent") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("suggestion_content"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DiagnosisId", "SuggestionContent" }, "ix_suggestion") + .IsUnique(); + + b.ToTable("suggestion"); + + b.HasComment("建议设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumDiagnosis", b => + { + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength(); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("SumSuggestionHeaderId") + .HasColumnType("uuid") + .HasColumnName("sum_suggestion_header_id"); + + b.HasKey("PatientRegisterId", "DiagnosisId") + .HasName("pk_summary_diagnosis"); + + b.HasIndex("DiagnosisId"); + + b.ToTable("sum_diagnosis"); + + b.HasComment("总检诊断"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SummaryTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("TemplateContent") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("template_content"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_summary_template") + .IsUnique(); + + b.ToTable("summary_template"); + + b.HasComment("综述模板设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSuggestionContent", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SuggestionContent") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("suggestion_content"); + + b.Property("SumSuggestionHeaderId") + .HasColumnType("uuid") + .HasColumnName("sum_suggestion_header_id"); + + b.HasKey("Id"); + + b.HasIndex("SumSuggestionHeaderId"); + + b.ToTable("sum_suggestion_content"); + + b.HasComment("总检建议内容"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSuggestionHeader", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("SuggestionFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("suggestion_flag"); + + b.Property("SuggestionTitle") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("suggestion_title"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "PatientRegisterId", "SuggestionTitle" }, "ix_sum_suggestion_title") + .IsUnique(); + + b.ToTable("sum_suggestion_header"); + + b.HasComment("总检建议头"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSummaryContent", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SumSummaryHeaderId") + .HasColumnType("uuid") + .HasColumnName("sum_summary_header_id"); + + b.Property("SummaryContent") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("summary_content"); + + b.HasKey("Id"); + + b.HasIndex("SumSummaryHeaderId"); + + b.ToTable("sum_summary_content"); + + b.HasComment("总检综述内容"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSummaryHeader", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("SummaryFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("summary_flag"); + + b.Property("SummaryTitle") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("summary_title"); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.ToTable("sum_summary_header"); + + b.HasComment("总检综述头"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Symptom", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("症状编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("症状名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("symptom"); + + b.HasComment("症状"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Sysdiagram", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("Definition") + .HasColumnType("bytea") + .HasColumnName("definition"); + + b.Property("DisplayName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("display_name"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PrincipalId") + .HasColumnType("uuid") + .HasColumnName("principal_id"); + + b.Property("Version") + .HasColumnType("integer") + .HasColumnName("version"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "PrincipalId", "DisplayName" }, "uk_principal_name") + .IsUnique(); + + b.ToTable("sysdiagrams"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParm", b => + { + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("SysParmTypeId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("sys_parm_type_id"); + + b.Property("ValueType") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("value_type"); + + b.HasKey("Id"); + + b.HasIndex("SysParmTypeId"); + + b.ToTable("sys_parm"); + + b.HasComment("系统参数设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmType", b => + { + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("parent_id"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("sys_parm_type"); + + b.HasComment("系统参数类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmValue", b => + { + b.Property("SysParmId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("sys_parm_id"); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParmValue") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("parm_value"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark"); + + b.HasKey("SysParmId", "OrganizationUnitId") + .HasName("pk_sys_parm_value"); + + b.ToTable("sys_parm_value"); + + b.HasComment("系统参数值设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmValueOption", b => + { + b.Property("SysParmId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("sys_parm_id"); + + b.Property("ValueOption") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("value_option"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("ValueOptionName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("value_option_name"); + + b.HasKey("SysParmId", "ValueOption") + .HasName("pk_sys_parm_value_option"); + + b.ToTable("sys_parm_value_option"); + + b.HasComment("系统参数可选值设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.TitleType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("职称类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("职称类别名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_title_type") + .IsUnique(); + + b.ToTable("title_type"); + + b.HasComment("职称类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Unit", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("unit"); + + b.HasComment("单位设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.User", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Address") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("address"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DepartmentId") + .HasColumnType("uuid") + .HasColumnName("department_id") + .IsFixedLength(); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("Email") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("email"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LockScreenTimeInterval") + .HasColumnType("integer") + .HasColumnName("lock_screen_time_interval"); + + b.Property("ModifiedDate") + .ValueGeneratedOnAdd() + .HasColumnType("date") + .HasColumnName("modified_date") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("Modifier") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("modifier"); + + b.Property("PasswordHash") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("password_hash"); + + b.Property("PasswordSalt") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("password_salt"); + + b.Property("Photo") + .HasColumnType("bytea") + .HasColumnName("photo"); + + b.Property("PositionTypeId") + .HasColumnType("uuid") + .HasColumnName("position_type_id"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark"); + + b.Property("SexId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("sex_id"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("Telephone") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("telephone"); + + b.Property("TitleTypeId") + .HasColumnType("uuid") + .HasColumnName("title_type_id"); + + b.Property("UserTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("user_type_flag") + .HasDefaultValueSql("0") + .HasComment("用户类型"); + + b.HasKey("Id"); + + b.HasIndex("DepartmentId"); + + b.ToTable("users"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserDepartment", b => + { + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("DepartmentId") + .HasColumnType("uuid") + .HasColumnName("department_id") + .IsFixedLength(); + + b.HasKey("UserId", "DepartmentId") + .HasName("pk_user_operate_department"); + + b.HasIndex("DepartmentId"); + + b.ToTable("user_department"); + + b.HasComment("用户科室操作权限"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserGrouping", b => + { + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("GroupingId") + .HasColumnType("uuid") + .HasColumnName("grouping_id"); + + b.HasKey("UserId", "GroupingId") + .HasName("pk_user_grouping"); + + b.HasIndex("GroupingId"); + + b.ToTable("user_grouping"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserItemType", b => + { + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength(); + + b.HasKey("UserId", "ItemTypeId") + .HasName("pk_user_item_type"); + + b.HasIndex("ItemTypeId"); + + b.ToTable("user_item_type"); + + b.HasComment("用户项目类别权限设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserRight", b => + { + b.Property("Application") + .HasMaxLength(32) + .HasColumnType("character varying(32)") + .HasColumnName("application"); + + b.Property("WindowName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("window_name"); + + b.Property("ControlName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("control_name"); + + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("IsUser") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_user"); + + b.Property("Status") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("status"); + + b.HasKey("Application", "WindowName", "ControlName", "UserId", "IsUser") + .HasName("pk_sys_function"); + + b.ToTable("user_rights"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("character varying(96)") + .HasColumnName("ApplicationName"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("BrowserInfo"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("ClientId"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("ClientIpAddress"); + + b.Property("ClientName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("ClientName"); + + b.Property("Comments") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("Comments"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("CorrelationId"); + + b.Property("Exceptions") + .HasColumnType("text"); + + b.Property("ExecutionDuration") + .HasColumnType("integer") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("timestamp without time zone"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("HttpMethod") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("HttpMethod"); + + b.Property("HttpStatusCode") + .HasColumnType("integer") + .HasColumnName("HttpStatusCode"); + + b.Property("ImpersonatorTenantId") + .HasColumnType("uuid") + .HasColumnName("ImpersonatorTenantId"); + + b.Property("ImpersonatorTenantName") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("ImpersonatorTenantName"); + + b.Property("ImpersonatorUserId") + .HasColumnType("uuid") + .HasColumnName("ImpersonatorUserId"); + + b.Property("ImpersonatorUserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("ImpersonatorUserName"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("TenantName"); + + b.Property("Url") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("Url"); + + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("UserId"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ExecutionTime"); + + b.HasIndex("TenantId", "UserId", "ExecutionTime"); + + b.ToTable("AbpAuditLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("AuditLogId") + .HasColumnType("uuid") + .HasColumnName("AuditLogId"); + + b.Property("ExecutionDuration") + .HasColumnType("integer") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("ExecutionTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("MethodName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("MethodName"); + + b.Property("Parameters") + .HasMaxLength(2000) + .HasColumnType("character varying(2000)") + .HasColumnName("Parameters"); + + b.Property("ServiceName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("ServiceName"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); + + b.ToTable("AbpAuditLogActions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("AuditLogId") + .HasColumnType("uuid") + .HasColumnName("AuditLogId"); + + b.Property("ChangeTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("ChangeTime"); + + b.Property("ChangeType") + .HasColumnType("smallint") + .HasColumnName("ChangeType"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("EntityId"); + + b.Property("EntityTenantId") + .HasColumnType("uuid"); + + b.Property("EntityTypeFullName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("EntityTypeFullName"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); + + b.ToTable("AbpEntityChanges", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("EntityChangeId") + .HasColumnType("uuid"); + + b.Property("NewValue") + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("NewValue"); + + b.Property("OriginalValue") + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("OriginalValue"); + + b.Property("PropertyName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("PropertyName"); + + b.Property("PropertyTypeFullName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("PropertyTypeFullName"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityChangeId"); + + b.ToTable("AbpEntityPropertyChanges", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsAbandoned") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false); + + b.Property("JobArgs") + .IsRequired() + .HasMaxLength(1048576) + .HasColumnType("character varying(1048576)"); + + b.Property("JobName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("LastTryTime") + .HasColumnType("timestamp without time zone"); + + b.Property("NextTryTime") + .HasColumnType("timestamp without time zone"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasDefaultValue((byte)15); + + b.Property("TryCount") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasDefaultValue((short)0); + + b.HasKey("Id"); + + b.HasIndex("IsAbandoned", "NextTryTime"); + + b.ToTable("AbpBackgroundJobs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpFeatureValues", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsStatic") + .HasColumnType("boolean"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("Regex") + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("RegexDescription") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("Required") + .HasColumnType("boolean"); + + b.Property("ValueType") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("SourceTenantId") + .HasColumnType("uuid"); + + b.Property("SourceUserId") + .HasColumnType("uuid"); + + b.Property("TargetTenantId") + .HasColumnType("uuid"); + + b.Property("TargetUserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique(); + + b.ToTable("AbpLinkUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDefault") + .HasColumnType("boolean") + .HasColumnName("IsDefault"); + + b.Property("IsPublic") + .HasColumnType("boolean") + .HasColumnName("IsPublic"); + + b.Property("IsStatic") + .HasColumnType("boolean") + .HasColumnName("IsStatic"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.Property("RoleId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Action") + .HasMaxLength(96) + .HasColumnType("character varying(96)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("character varying(96)"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("Identity") + .HasMaxLength(96) + .HasColumnType("character varying(96)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Action"); + + b.HasIndex("TenantId", "ApplicationName"); + + b.HasIndex("TenantId", "Identity"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSecurityLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("boolean") + .HasColumnName("IsActive"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsExternal") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsExternal"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); + + b.Property("LockoutEnd") + .HasColumnType("timestamp with time zone"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("Name"); + + b.Property("NormalizedEmail") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("NormalizedEmail"); + + b.Property("NormalizedUserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("NormalizedUserName"); + + b.Property("PasswordHash") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("PasswordHash"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("SecurityStamp"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("Email"); + + b.HasIndex("NormalizedEmail"); + + b.HasIndex("NormalizedUserName"); + + b.HasIndex("UserName"); + + b.ToTable("AbpUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderDisplayName") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(196) + .HasColumnType("character varying(196)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "LoginProvider"); + + b.HasIndex("LoginProvider", "ProviderKey"); + + b.ToTable("AbpUserLogins", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uuid"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "UserId"); + + b.HasIndex("UserId", "OrganizationUnitId"); + + b.ToTable("AbpUserOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("RoleId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId", "UserId"); + + b.ToTable("AbpUserRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasColumnType("text"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(95) + .HasColumnType("character varying(95)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsPeis") + .HasMaxLength(1) + .HasColumnType("character varying(1)"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code"); + + b.HasIndex("ParentId"); + + b.ToTable("AbpOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uuid"); + + b.Property("RoleId") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "RoleId"); + + b.HasIndex("RoleId", "OrganizationUnitId"); + + b.ToTable("AbpOrganizationUnitRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ClientId") + .HasMaxLength(100) + .HasColumnType("character varying(100)"); + + b.Property("ClientSecret") + .HasColumnType("text"); + + b.Property("ClientUri") + .HasColumnType("text"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConsentType") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .HasColumnType("text"); + + b.Property("DisplayNames") + .HasColumnType("text"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LogoUri") + .HasColumnType("text"); + + b.Property("Permissions") + .HasColumnType("text"); + + b.Property("PostLogoutRedirectUris") + .HasColumnType("text"); + + b.Property("Properties") + .HasColumnType("text"); + + b.Property("RedirectUris") + .HasColumnType("text"); + + b.Property("Requirements") + .HasColumnType("text"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("OpenIddictApplications", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ApplicationId") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("timestamp without time zone"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Properties") + .HasColumnType("text"); + + b.Property("Scopes") + .HasColumnType("text"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("character varying(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictAuthorizations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Scopes.OpenIddictScope", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("text"); + + b.Property("Descriptions") + .HasColumnType("text"); + + b.Property("DisplayName") + .HasColumnType("text"); + + b.Property("DisplayNames") + .HasColumnType("text"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(200) + .HasColumnType("character varying(200)"); + + b.Property("Properties") + .HasColumnType("text"); + + b.Property("Resources") + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("OpenIddictScopes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ApplicationId") + .HasColumnType("uuid"); + + b.Property("AuthorizationId") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("timestamp without time zone"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExpirationDate") + .HasColumnType("timestamp without time zone"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Payload") + .HasColumnType("text"); + + b.Property("Properties") + .HasColumnType("text"); + + b.Property("RedemptionDate") + .HasColumnType("timestamp without time zone"); + + b.Property("ReferenceId") + .HasMaxLength(100) + .HasColumnType("character varying(100)"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("character varying(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.HasKey("Id"); + + b.HasIndex("AuthorizationId"); + + b.HasIndex("ReferenceId"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpPermissionGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("character varying(2048)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpSettings", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("AbpTenants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("uuid"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.HasKey("TenantId", "Name"); + + b.ToTable("AbpTenantConnectionStrings", (string)null); + }); + + modelBuilder.Entity("ChildDiagnosis", b => + { + b.HasOne("Shentun.Peis.Models.Diagnosis", null) + .WithMany() + .HasForeignKey("DiagnosisId") + .IsRequired() + .HasConstraintName("fk_child_diagnosis_diagnosis1"); + + b.HasOne("Shentun.Peis.Models.Diagnosis", null) + .WithMany() + .HasForeignKey("ParentDiagnosisId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_child_diagnosis_diagnosis"); + }); + + modelBuilder.Entity("RoomAsbitem", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", null) + .WithMany() + .HasForeignKey("AsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_room_asbitem_asbitem"); + + b.HasOne("Shentun.Peis.Models.Room", null) + .WithMany() + .HasForeignKey("RoomId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_room_asbitem_room"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.HelloA", b => + { + b.HasOne("Shentun.Peis.Books.HelloType", "HelloType") + .WithMany("HelloAs") + .HasForeignKey("HelloTypeId") + .IsRequired() + .HasConstraintName("fk_hello_a_hello_type"); + + b.Navigation("HelloType"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.TestB", b => + { + b.HasOne("Shentun.Peis.Books.TestA", "TestAs") + .WithMany("TestBs") + .HasForeignKey("TestAsAId"); + + b.Navigation("TestAs"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Asbitem", b => + { + b.HasOne("Shentun.Peis.Models.InvoiceItemType", "InvoiceItemType") + .WithMany("Asbitems") + .HasForeignKey("InvoiceItemTypeId") + .IsRequired() + .HasConstraintName("fk_asbitem_invoice_item_type"); + + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("Asbitems") + .HasForeignKey("ItemTypeId") + .IsRequired() + .HasConstraintName("fk_asbitem_item_type"); + + b.Navigation("InvoiceItemType"); + + b.Navigation("ItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.AsbitemDetail", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithMany("AsbitemDetails") + .HasForeignKey("AsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_asbitem_detail_asbitem"); + + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("AsbitemDetails") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_asbitem_detail_item"); + + b.Navigation("Asbitem"); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultConclusion", b => + { + b.HasOne("Shentun.Peis.Models.BigtextResultTemplate", "BigtextResultTemplate") + .WithMany("BigtextResultConclusions") + .HasForeignKey("BigtextResultTemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_bigtext"); + + b.Navigation("BigtextResultTemplate"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultDescription", b => + { + b.HasOne("Shentun.Peis.Models.BigtextResultTemplate", "BigtextResultTemplate") + .WithMany("BigtextResultDescriptions") + .HasForeignKey("BigtextResultTemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_bigtext"); + + b.Navigation("BigtextResultTemplate"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultTemplate", b => + { + b.HasOne("Shentun.Peis.Models.BigtextResultType", "BigtextResultType") + .WithMany("BigtextResultTemplates") + .HasForeignKey("BigtextResultTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_bigtext"); + + b.Navigation("BigtextResultType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultType", b => + { + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("BigtextResultTypes") + .HasForeignKey("ItemTypeId") + .IsRequired() + .HasConstraintName("fk_bigtext"); + + b.Navigation("ItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardBill", b => + { + b.HasOne("Shentun.Peis.Models.CardRegister", "CardRegister") + .WithMany("CardBills") + .HasForeignKey("CardRegisterId") + .IsRequired() + .HasConstraintName("fk_card_bil_reference_card_reg"); + + b.HasOne("Shentun.Peis.Models.PayMode", "PayMode") + .WithMany("CardBills") + .HasForeignKey("PayModeId") + .HasConstraintName("fk_card_bill_payment_mode"); + + b.Navigation("CardRegister"); + + b.Navigation("PayMode"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardRegister", b => + { + b.HasOne("Shentun.Peis.Models.CardType", "CardType") + .WithMany("CardRegisters") + .HasForeignKey("CardTypeId") + .IsRequired() + .HasConstraintName("fk_card_reg_reference_card_typ"); + + b.HasOne("Shentun.Peis.Models.Department", "OrganizationUnit") + .WithMany("CardRegisters") + .HasForeignKey("OrganizationUnitId") + .IsRequired() + .HasConstraintName("fk_card_register_department"); + + b.Navigation("CardType"); + + b.Navigation("OrganizationUnit"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Charge", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("Charges") + .HasForeignKey("PatientRegisterId") + .IsRequired() + .HasConstraintName("fk_patient_register_charge"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeAsbitem", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithMany("ChargeAsbitems") + .HasForeignKey("AsbitemId") + .IsRequired() + .HasConstraintName("fk_charge_asbitem_asbitem"); + + b.HasOne("Shentun.Peis.Models.Charge", "Charge") + .WithMany("ChargeAsbitems") + .HasForeignKey("ChargeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_charge_asbitem_charge"); + + b.Navigation("Asbitem"); + + b.Navigation("Charge"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeBack", b => + { + b.HasOne("Shentun.Peis.Models.Charge", "Charge") + .WithMany("ChargeBacks") + .HasForeignKey("ChargeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_bill_bac_reference_bill"); + + b.Navigation("Charge"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeBackPay", b => + { + b.HasOne("Shentun.Peis.Models.ChargeBack", "ChargeBack") + .WithMany("ChargeBackPays") + .HasForeignKey("ChargeBackId") + .IsRequired() + .HasConstraintName("fk_charge_back_pay_charge_back"); + + b.HasOne("Shentun.Peis.Models.PayMode", "PayMode") + .WithMany("ChargeBackPays") + .HasForeignKey("PayModeId") + .IsRequired() + .HasConstraintName("fk_charge_back_pay_pay_mode"); + + b.Navigation("ChargeBack"); + + b.Navigation("PayMode"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargePay", b => + { + b.HasOne("Shentun.Peis.Models.Charge", "Charge") + .WithMany("ChargePays") + .HasForeignKey("ChargeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_charge_payment_mode_charge"); + + b.HasOne("Shentun.Peis.Models.PayMode", "PayMode") + .WithMany("ChargePays") + .HasForeignKey("PayModeId") + .IsRequired() + .HasConstraintName("fk_charge_"); + + b.Navigation("Charge"); + + b.Navigation("PayMode"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargePriceItem", b => + { + b.HasOne("Shentun.Peis.Models.ChargeAsbitem", "ChargeAsbitem") + .WithMany("ChargePriceItems") + .HasForeignKey("ChargeAsbitemId") + .IsRequired() + .HasConstraintName("fk_charge_asbitem"); + + b.Navigation("ChargeAsbitem"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CommonChar", b => + { + b.HasOne("Shentun.Peis.Models.CommonCharType", "CommonCharType") + .WithMany("CommonChars") + .HasForeignKey("CommonCharTypeId") + .IsRequired() + .HasConstraintName("fk_common_char_common_char_type"); + + b.Navigation("CommonCharType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ContactMethod", b => + { + b.HasOne("Shentun.Peis.Models.ContactPerson", "ContactPerson") + .WithMany("ContactMethods") + .HasForeignKey("ContactPersonId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_contact_method_contact"); + + b.Navigation("ContactPerson"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ContactPerson", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrg", "CustomerOrg") + .WithMany("ContactPeople") + .HasForeignKey("CustomerOrgId") + .IsRequired() + .HasConstraintName("fk_contact_org"); + + b.Navigation("CustomerOrg"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CriticalValue", b => + { + b.HasOne("Shentun.Peis.Models.CriticalValueType", "CriticalValueType") + .WithMany("CriticalValues") + .HasForeignKey("CriticalValueTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_critica"); + + b.Navigation("CriticalValueType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgCharge", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgRegister", "CustomerOrgRegister") + .WithMany("CustomerOrgCharges") + .HasForeignKey("CustomerOrgRegisterId") + .IsRequired() + .HasConstraintName("fk_customer_org_charge_register"); + + b.Navigation("CustomerOrgRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargeBack", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgCharge", "CustomerOrgCharge") + .WithMany("CustomerOrgChargeBacks") + .HasForeignKey("CustomerOrgChargeId") + .IsRequired() + .HasConstraintName("fk_org_charge_back_org_charge"); + + b.Navigation("CustomerOrgCharge"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargeBackPay", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgChargeBack", "CustomerOrgChargeBack") + .WithMany("CustomerOrgChargeBackPays") + .HasForeignKey("CustomerOrgChargeBackId") + .IsRequired() + .HasConstraintName("fk_org_cha"); + + b.HasOne("Shentun.Peis.Models.PayMode", "PayMode") + .WithMany("CustomerOrgChargeBackPays") + .HasForeignKey("PayModeId") + .IsRequired() + .HasConstraintName("fk_org_charge_back_pay_pay_mode"); + + b.Navigation("CustomerOrgChargeBack"); + + b.Navigation("PayMode"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargePay", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgCharge", "CustomerOrgCharge") + .WithOne("CustomerOrgChargePay") + .HasForeignKey("Shentun.Peis.Models.CustomerOrgChargePay", "Id") + .IsRequired() + .HasConstraintName("fk_org_charge_pay_org_charge"); + + b.HasOne("Shentun.Peis.Models.PayMode", "PayMode") + .WithMany("CustomerOrgChargePays") + .HasForeignKey("PayModeId") + .HasConstraintName("fk_org_charge_pay_pay_mode"); + + b.Navigation("CustomerOrgCharge"); + + b.Navigation("PayMode"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgGroup", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgRegister", "CustomerOrgRegister") + .WithMany("CustomerOrgGroups") + .HasForeignKey("CustomerOrgRegisterId") + .IsRequired() + .HasConstraintName("fk_customer_org_group_register"); + + b.Navigation("CustomerOrgRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgGroupDetail", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithMany("CustomerOrgGroupDetails") + .HasForeignKey("AsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_org_group_detail_asbitem"); + + b.HasOne("Shentun.Peis.Models.CustomerOrgGroup", "CustomerOrgGroup") + .WithMany("CustomerOrgGroupDetails") + .HasForeignKey("CustomerOrgGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_org_group_detail_org_group"); + + b.Navigation("Asbitem"); + + b.Navigation("CustomerOrgGroup"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgRegister", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrg", "CustomerOrg") + .WithMany("CustomerOrgRegisters") + .HasForeignKey("CustomerOrgId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_org_medi_reference_org"); + + b.Navigation("CustomerOrg"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Diagnosis", b => + { + b.HasOne("Shentun.Peis.Models.DiagnosisLevel", "DiagnosisLevel") + .WithMany("Diagnoses") + .HasForeignKey("DiagnosisLevelId") + .IsRequired() + .HasConstraintName("fk_diagnosis_diagnosis_level"); + + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("Diagnoses") + .HasForeignKey("ItemTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_diagnosis_item_type"); + + b.Navigation("DiagnosisLevel"); + + b.Navigation("ItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisTemplateDetail", b => + { + b.HasOne("Shentun.Peis.Models.Diagnosis", "Diagnosis") + .WithMany("DiagnosisTemplateDetails") + .HasForeignKey("DiagnosisId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_diagnos"); + + b.HasOne("Shentun.Peis.Models.DiagnosisTemplate", "DiagnosisTemplate") + .WithMany("DiagnosisTemplateDetails") + .HasForeignKey("DiagnosisTemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_diagno2"); + + b.Navigation("Diagnosis"); + + b.Navigation("DiagnosisTemplate"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.HealthCertificate", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithOne("HealthCertificate") + .HasForeignKey("Shentun.Peis.Models.HealthCertificate", "Id") + .IsRequired() + .HasConstraintName("fk_health_"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Item", b => + { + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("Items") + .HasForeignKey("ItemTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_item_type"); + + b.Navigation("ItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultMatch", b => + { + b.HasOne("Shentun.Peis.Models.Diagnosis", "Diagnosis") + .WithMany("ItemResultMatches") + .HasForeignKey("DiagnosisId") + .IsRequired() + .HasConstraintName("fk_item_result_match_diagnosis"); + + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("ItemResultMatches") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_res_reference_item1"); + + b.Navigation("Diagnosis"); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultTemplate", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("ItemResultTemplates") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_res_reference_item"); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultTemplateType", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("ItemResultTemplateTypes") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_re"); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemTemplateDetail", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("ItemTemplateDetails") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_template_detail_item"); + + b.HasOne("Shentun.Peis.Models.ItemTemplate", "ItemTemplate") + .WithMany("ItemTemplateDetails") + .HasForeignKey("ItemTemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_te"); + + b.Navigation("Item"); + + b.Navigation("ItemTemplate"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemType", b => + { + b.HasOne("Shentun.Peis.Models.GuideType", "GuidType") + .WithMany("ItemTypes") + .HasForeignKey("GuidTypeId") + .IsRequired() + .HasConstraintName("fk_item_type_guide_type"); + + b.HasOne("Shentun.Peis.Models.MedicalReportType", "MedicalReportType") + .WithMany("ItemTypes") + .HasForeignKey("MedicalReportTypeId") + .IsRequired() + .HasConstraintName("fk_item_ty"); + + b.Navigation("GuidType"); + + b.Navigation("MedicalReportType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.LisRequest", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("LisRequests") + .HasForeignKey("PatientRegisterId") + .IsRequired() + .HasConstraintName("fk_lis_request_patient_register"); + + b.HasOne("Shentun.Peis.Models.SampleContainer", "SampleContainer") + .WithMany("LisRequests") + .HasForeignKey("SampleContainerId") + .IsRequired() + .HasConstraintName("fk_lis_request_sample_container"); + + b.HasOne("Shentun.Peis.Models.SampleType", "SampleType") + .WithMany("LisRequests") + .HasForeignKey("SampleTypeId") + .IsRequired() + .HasConstraintName("fk_lis_request_sample_type"); + + b.Navigation("PatientRegister"); + + b.Navigation("SampleContainer"); + + b.Navigation("SampleType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalConclusion", b => + { + b.HasOne("Shentun.Peis.Models.MedicalConclusionType", "MedicalConclusionType") + .WithMany("MedicalConclusions") + .HasForeignKey("MedicalConclusionTypeId") + .HasConstraintName("fk_medical"); + + b.Navigation("MedicalConclusionType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalPackageDetail", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithMany("MedicalPackageDetails") + .HasForeignKey("AsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_medical"); + + b.HasOne("Shentun.Peis.Models.MedicalPackage", "MedicalPackage") + .WithMany("MedicalPackageDetails") + .HasForeignKey("MedicalPackageId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_medica2"); + + b.Navigation("Asbitem"); + + b.Navigation("MedicalPackage"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.OrganizationUnitsCustomerOrg", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrg", "CustomerOrg") + .WithMany("OrganizationUnitsCustomerOrgs") + .HasForeignKey("CustomerOrgId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_medical_center_org_org"); + + b.HasOne("Shentun.Peis.Models.Department", "OrganizationUnit") + .WithMany("OrganizationUnitsCustomerOrgs") + .HasForeignKey("OrganizationUnitId") + .IsRequired() + .HasConstraintName("fk_medical"); + + b.Navigation("CustomerOrg"); + + b.Navigation("OrganizationUnit"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientOccupationalDisease", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithOne("PatientOccupationalDisease") + .HasForeignKey("Shentun.Peis.Models.PatientOccupationalDisease", "Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_patient"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientOccupationalHistory", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("PatientOccupationalHistories") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_occupat"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientPoison", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("PatientPoisons") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_patient"); + + b.HasOne("Shentun.Peis.Models.Poison", "Poison") + .WithMany("PatientPoisons") + .HasForeignKey("PoisonId") + .IsRequired() + .HasConstraintName("fk_patient_poison_poison"); + + b.Navigation("PatientRegister"); + + b.Navigation("Poison"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientRegister", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgRegister", "CustomerOrgRegister") + .WithMany("PatientRegisters") + .HasForeignKey("CustomerOrgRegisterId") + .IsRequired() + .HasConstraintName("fk_patient_register_org_register"); + + b.HasOne("Shentun.Peis.Models.MaritalStatus", "MaritalStatus") + .WithMany("PatientRegisters") + .HasForeignKey("MaritalStatusId") + .IsRequired() + .HasConstraintName("fk_patient_register_marital_status_id"); + + b.Navigation("CustomerOrgRegister"); + + b.Navigation("MaritalStatus"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientSymptom", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("PatientSymptoms") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_patient"); + + b.HasOne("Shentun.Peis.Models.Symptom", "Symptom") + .WithMany("PatientSymptoms") + .HasForeignKey("SymptomId") + .IsRequired() + .HasConstraintName("fk_patient_symptom_symptom"); + + b.Navigation("PatientRegister"); + + b.Navigation("Symptom"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PhoneFollow", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("PhoneFollows") + .HasForeignKey("PatientRegisterId") + .IsRequired() + .HasConstraintName("fk_phone_f"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Poison", b => + { + b.HasOne("Shentun.Peis.Models.PoisonType", "PoisonType") + .WithMany("Poisons") + .HasForeignKey("PoisonTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_poison_poison_type"); + + b.Navigation("PoisonType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PriceItem", b => + { + b.HasOne("Shentun.Peis.Models.InvoiceItemType", "InvoiceItemType") + .WithMany("PriceItems") + .HasForeignKey("InvoiceItemTypeId") + .IsRequired() + .HasConstraintName("fk_price_item_invoice_item_type"); + + b.Navigation("InvoiceItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.QueueRegister", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("QueueRegisters") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_queue_r"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ReferenceRange", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("ReferenceRanges") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_referenc_reference_item"); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterAsbitem", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithMany("RegisterAsbitems") + .HasForeignKey("AsbitemId") + .IsRequired() + .HasConstraintName("fk_register_reference_asbitem"); + + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("RegisterAsbitems") + .HasForeignKey("PatientRegisterId") + .IsRequired() + .HasConstraintName("fk_register_reference_patient_"); + + b.HasOne("Shentun.Peis.Models.RegisterCheck", "RegisterCheck") + .WithMany("RegisterAsbitems") + .HasForeignKey("RegisterCheckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_registe"); + + b.Navigation("Asbitem"); + + b.Navigation("PatientRegister"); + + b.Navigation("RegisterCheck"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckItem", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("RegisterCheckItems") + .HasForeignKey("ItemId") + .IsRequired() + .HasConstraintName("fk_register_reference_item"); + + b.HasOne("Shentun.Peis.Models.RegisterCheck", "RegisterCheck") + .WithMany("RegisterCheckItems") + .HasForeignKey("RegisterCheckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_register_item_register_check"); + + b.HasOne("Shentun.Peis.Models.ResultStatus", "ResultStatus") + .WithMany("RegisterCheckItems") + .HasForeignKey("ResultStatusId") + .HasConstraintName("fk_register_item_result_status"); + + b.Navigation("Item"); + + b.Navigation("RegisterCheck"); + + b.Navigation("ResultStatus"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckPicture", b => + { + b.HasOne("Shentun.Peis.Models.RegisterCheck", "RegisterCheck") + .WithMany("RegisterCheckPictures") + .HasForeignKey("RegisterCheckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_check_picture_register_check"); + + b.Navigation("RegisterCheck"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckSuggestion", b => + { + b.HasOne("Shentun.Peis.Models.RegisterCheck", "RegisterCheck") + .WithMany("RegisterCheckSuggestions") + .HasForeignKey("RegisterCheckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_registe"); + + b.Navigation("RegisterCheck"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckSummary", b => + { + b.HasOne("Shentun.Peis.Models.RegisterCheck", "RegisterCheck") + .WithMany("RegisterCheckSummaries") + .HasForeignKey("RegisterCheckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_registe"); + + b.Navigation("RegisterCheck"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Room", b => + { + b.HasOne("Shentun.Peis.Models.Department", "Department") + .WithMany("Rooms") + .HasForeignKey("DepartmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_room_department"); + + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("Rooms") + .HasForeignKey("ItemTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_room_item_type"); + + b.Navigation("Department"); + + b.Navigation("ItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleGroup", b => + { + b.HasOne("Shentun.Peis.Models.SampleContainer", "SampleContainer") + .WithMany("SampleGroups") + .HasForeignKey("SampleContainerId") + .IsRequired() + .HasConstraintName("fk_sample_"); + + b.HasOne("Shentun.Peis.Models.SampleType", "SampleType") + .WithMany("SampleGroups") + .HasForeignKey("SampleTypeId") + .IsRequired() + .HasConstraintName("fk_sample_group_sample_type"); + + b.Navigation("SampleContainer"); + + b.Navigation("SampleType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleGroupDetail", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithOne("SampleGroupDetail") + .HasForeignKey("Shentun.Peis.Models.SampleGroupDetail", "AsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sample_group_detail_asbitem"); + + b.HasOne("Shentun.Peis.Models.SampleGroup", "SampleGroup") + .WithMany("SampleGroupDetails") + .HasForeignKey("SampleGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sample_"); + + b.Navigation("Asbitem"); + + b.Navigation("SampleGroup"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ServiceTrade", b => + { + b.HasOne("Shentun.Peis.Models.Department", "Department") + .WithMany("ServiceTrades") + .HasForeignKey("DepartmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_service_trades_department"); + + b.Navigation("Department"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SexHormoneReferenceRange", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("SexHormoneReferenceRanges") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sex_hor"); + + b.HasOne("Shentun.Peis.Models.SexHormoneTerm", "SexHormoneTerm") + .WithMany("SexHormoneReferenceRanges") + .HasForeignKey("SexHormoneTermId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sex_ho2"); + + b.Navigation("Item"); + + b.Navigation("SexHormoneTerm"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Suggestion", b => + { + b.HasOne("Shentun.Peis.Models.Diagnosis", "Diagnosis") + .WithMany("Suggestions") + .HasForeignKey("DiagnosisId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_suggestion_diagnosis"); + + b.Navigation("Diagnosis"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumDiagnosis", b => + { + b.HasOne("Shentun.Peis.Models.Diagnosis", "Diagnosis") + .WithMany("SumDiagnoses") + .HasForeignKey("DiagnosisId") + .IsRequired() + .HasConstraintName("fk_sum_diagnosis_diagnosis"); + + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("SumDiagnoses") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sum_dia"); + + b.Navigation("Diagnosis"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSuggestionContent", b => + { + b.HasOne("Shentun.Peis.Models.SumSuggestionHeader", "SumSuggestionHeader") + .WithMany("SumSuggestionContents") + .HasForeignKey("SumSuggestionHeaderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sum_sug"); + + b.Navigation("SumSuggestionHeader"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSuggestionHeader", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("SumSuggestionHeaders") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sum_sug"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSummaryContent", b => + { + b.HasOne("Shentun.Peis.Models.SumSummaryHeader", "SumSummaryHeader") + .WithMany("SumSummaryContents") + .HasForeignKey("SumSummaryHeaderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sum_sum"); + + b.Navigation("SumSummaryHeader"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSummaryHeader", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("SumSummaryHeaders") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sum_sum"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParm", b => + { + b.HasOne("Shentun.Peis.Models.SysParmType", "SysParmType") + .WithMany("SysParms") + .HasForeignKey("SysParmTypeId") + .HasConstraintName("fk_sys_parm_sys_parm_type"); + + b.Navigation("SysParmType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmValue", b => + { + b.HasOne("Shentun.Peis.Models.SysParm", "SysParm") + .WithMany("SysParmValues") + .HasForeignKey("SysParmId") + .IsRequired() + .HasConstraintName("fk_sys_parm_value_sys_parm"); + + b.Navigation("SysParm"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmValueOption", b => + { + b.HasOne("Shentun.Peis.Models.SysParm", "SysParm") + .WithMany("SysParmValueOptions") + .HasForeignKey("SysParmId") + .IsRequired() + .HasConstraintName("fk_sys_par"); + + b.Navigation("SysParm"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.User", b => + { + b.HasOne("Shentun.Peis.Models.Department", "Department") + .WithMany("Users") + .HasForeignKey("DepartmentId") + .IsRequired() + .HasConstraintName("fk_user_department"); + + b.Navigation("Department"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserDepartment", b => + { + b.HasOne("Shentun.Peis.Models.Department", "Department") + .WithMany("UserDepartments") + .HasForeignKey("DepartmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_op"); + + b.HasOne("Shentun.Peis.Models.User", "User") + .WithMany("UserDepartments") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_o2"); + + b.Navigation("Department"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserGrouping", b => + { + b.HasOne("Shentun.Peis.Models.Grouping", "Grouping") + .WithMany("UserGroupings") + .HasForeignKey("GroupingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_grouping_grouping"); + + b.HasOne("Shentun.Peis.Models.User", "User") + .WithMany("UserGroupings") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_grouping_users"); + + b.Navigation("Grouping"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserItemType", b => + { + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("UserItemTypes") + .HasForeignKey("ItemTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_item_type_item_type"); + + b.HasOne("Shentun.Peis.Models.User", "User") + .WithMany("UserItemTypes") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_item_type_users"); + + b.Navigation("ItemType"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("Actions") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("EntityChanges") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.EntityChange", null) + .WithMany("PropertyChanges") + .HasForeignKey("EntityChangeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany("Claims") + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Claims") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Logins") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("OrganizationUnits") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Roles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Tokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("ParentId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany("Roles") + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + + b.HasOne("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", null) + .WithMany() + .HasForeignKey("AuthorizationId"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.HasOne("Volo.Abp.TenantManagement.Tenant", null) + .WithMany("ConnectionStrings") + .HasForeignKey("TenantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Shentun.Peis.Books.HelloType", b => + { + b.Navigation("HelloAs"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.TestA", b => + { + b.Navigation("TestBs"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Asbitem", b => + { + b.Navigation("AsbitemDetails"); + + b.Navigation("ChargeAsbitems"); + + b.Navigation("CustomerOrgGroupDetails"); + + b.Navigation("MedicalPackageDetails"); + + b.Navigation("RegisterAsbitems"); + + b.Navigation("SampleGroupDetail"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultTemplate", b => + { + b.Navigation("BigtextResultConclusions"); + + b.Navigation("BigtextResultDescriptions"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultType", b => + { + b.Navigation("BigtextResultTemplates"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardRegister", b => + { + b.Navigation("CardBills"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardType", b => + { + b.Navigation("CardRegisters"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Charge", b => + { + b.Navigation("ChargeAsbitems"); + + b.Navigation("ChargeBacks"); + + b.Navigation("ChargePays"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeAsbitem", b => + { + b.Navigation("ChargePriceItems"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeBack", b => + { + b.Navigation("ChargeBackPays"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CommonCharType", b => + { + b.Navigation("CommonChars"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ContactPerson", b => + { + b.Navigation("ContactMethods"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CriticalValueType", b => + { + b.Navigation("CriticalValues"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrg", b => + { + b.Navigation("ContactPeople"); + + b.Navigation("CustomerOrgRegisters"); + + b.Navigation("OrganizationUnitsCustomerOrgs"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgCharge", b => + { + b.Navigation("CustomerOrgChargeBacks"); + + b.Navigation("CustomerOrgChargePay"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargeBack", b => + { + b.Navigation("CustomerOrgChargeBackPays"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgGroup", b => + { + b.Navigation("CustomerOrgGroupDetails"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgRegister", b => + { + b.Navigation("CustomerOrgCharges"); + + b.Navigation("CustomerOrgGroups"); + + b.Navigation("PatientRegisters"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Department", b => + { + b.Navigation("CardRegisters"); + + b.Navigation("OrganizationUnitsCustomerOrgs"); + + b.Navigation("Rooms"); + + b.Navigation("ServiceTrades"); + + b.Navigation("UserDepartments"); + + b.Navigation("Users"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Diagnosis", b => + { + b.Navigation("DiagnosisTemplateDetails"); + + b.Navigation("ItemResultMatches"); + + b.Navigation("Suggestions"); + + b.Navigation("SumDiagnoses"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisLevel", b => + { + b.Navigation("Diagnoses"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisTemplate", b => + { + b.Navigation("DiagnosisTemplateDetails"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Grouping", b => + { + b.Navigation("UserGroupings"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.GuideType", b => + { + b.Navigation("ItemTypes"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.InvoiceItemType", b => + { + b.Navigation("Asbitems"); + + b.Navigation("PriceItems"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Item", b => + { + b.Navigation("AsbitemDetails"); + + b.Navigation("ItemResultMatches"); + + b.Navigation("ItemResultTemplateTypes"); + + b.Navigation("ItemResultTemplates"); + + b.Navigation("ItemTemplateDetails"); + + b.Navigation("ReferenceRanges"); + + b.Navigation("RegisterCheckItems"); + + b.Navigation("SexHormoneReferenceRanges"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemTemplate", b => + { + b.Navigation("ItemTemplateDetails"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemType", b => + { + b.Navigation("Asbitems"); + + b.Navigation("BigtextResultTypes"); + + b.Navigation("Diagnoses"); + + b.Navigation("Items"); + + b.Navigation("Rooms"); + + b.Navigation("UserItemTypes"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MaritalStatus", b => + { + b.Navigation("PatientRegisters"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalConclusionType", b => + { + b.Navigation("MedicalConclusions"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalPackage", b => + { + b.Navigation("MedicalPackageDetails"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalReportType", b => + { + b.Navigation("ItemTypes"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientRegister", b => + { + b.Navigation("Charges"); + + b.Navigation("HealthCertificate"); + + b.Navigation("LisRequests"); + + b.Navigation("PatientOccupationalDisease"); + + b.Navigation("PatientOccupationalHistories"); + + b.Navigation("PatientPoisons"); + + b.Navigation("PatientSymptoms"); + + b.Navigation("PhoneFollows"); + + b.Navigation("QueueRegisters"); + + b.Navigation("RegisterAsbitems"); + + b.Navigation("SumDiagnoses"); + + b.Navigation("SumSuggestionHeaders"); + + b.Navigation("SumSummaryHeaders"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PayMode", b => + { + b.Navigation("CardBills"); + + b.Navigation("ChargeBackPays"); + + b.Navigation("ChargePays"); + + b.Navigation("CustomerOrgChargeBackPays"); + + b.Navigation("CustomerOrgChargePays"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Poison", b => + { + b.Navigation("PatientPoisons"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PoisonType", b => + { + b.Navigation("Poisons"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheck", b => + { + b.Navigation("RegisterAsbitems"); + + b.Navigation("RegisterCheckItems"); + + b.Navigation("RegisterCheckPictures"); + + b.Navigation("RegisterCheckSuggestions"); + + b.Navigation("RegisterCheckSummaries"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ResultStatus", b => + { + b.Navigation("RegisterCheckItems"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleContainer", b => + { + b.Navigation("LisRequests"); + + b.Navigation("SampleGroups"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleGroup", b => + { + b.Navigation("SampleGroupDetails"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleType", b => + { + b.Navigation("LisRequests"); + + b.Navigation("SampleGroups"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SexHormoneTerm", b => + { + b.Navigation("SexHormoneReferenceRanges"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSuggestionHeader", b => + { + b.Navigation("SumSuggestionContents"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSummaryHeader", b => + { + b.Navigation("SumSummaryContents"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Symptom", b => + { + b.Navigation("PatientSymptoms"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParm", b => + { + b.Navigation("SysParmValueOptions"); + + b.Navigation("SysParmValues"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmType", b => + { + b.Navigation("SysParms"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.User", b => + { + b.Navigation("UserDepartments"); + + b.Navigation("UserGroupings"); + + b.Navigation("UserItemTypes"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Navigation("Actions"); + + b.Navigation("EntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Navigation("PropertyChanges"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Navigation("Claims"); + + b.Navigation("Logins"); + + b.Navigation("OrganizationUnits"); + + b.Navigation("Roles"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Navigation("Roles"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230625011736_i0625.cs b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230625011736_i0625.cs new file mode 100644 index 00000000..d55d0a5b --- /dev/null +++ b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230625011736_i0625.cs @@ -0,0 +1,6522 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Shentun.Peis.Migrations +{ + public partial class i0625 : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterTable( + name: "users", + oldComment: "用户表,废弃"); + + migrationBuilder.AlterTable( + name: "user_rights", + oldComment: "用户控件权限-废弃"); + + migrationBuilder.AlterTable( + name: "user_grouping", + oldComment: "用户组权限-废弃"); + + migrationBuilder.AlterTable( + name: "user_department", + comment: "用户科室操作权限", + oldComment: "用户科室操作权限,废弃"); + + migrationBuilder.AlterTable( + name: "sysdiagrams", + oldComment: "不是本软件的表,估计是系统自动生成的"); + + migrationBuilder.AlterTable( + name: "sms_type", + oldComment: "短信类别"); + + migrationBuilder.AlterTable( + name: "sms_template", + oldComment: "短信模板"); + + migrationBuilder.AlterTable( + name: "sms_send", + oldComment: "短信发送"); + + migrationBuilder.AlterTable( + name: "primarykey_builder", + comment: "主键产生器", + oldComment: "主键产生器,废弃"); + + migrationBuilder.AlterTable( + name: "patient_symptom", + oldComment: "职业病-体检病人症状"); + + migrationBuilder.AlterTable( + name: "operate_log", + comment: "操作日志", + oldComment: "作日志,已经废弃"); + + migrationBuilder.AlterTable( + name: "grouping", + oldComment: "废弃"); + + migrationBuilder.AlterTable( + name: "for_sex", + comment: "可支持性别设置", + oldComment: "适用性别设置,固定编码"); + + migrationBuilder.AlterTable( + name: "follow_up_type", + oldComment: "随访类别"); + + migrationBuilder.AlterTable( + name: "follow_up_plan", + oldComment: "随访计划"); + + migrationBuilder.AlterTable( + name: "follow_up_mode", + oldComment: "随访方式"); + + migrationBuilder.AlterTable( + name: "department", + comment: "部门", + oldComment: "部门,已经废弃"); + + migrationBuilder.AlterTable( + name: "customer_org_type", + comment: "团体类型设置", + oldComment: "客户单位类别"); + + migrationBuilder.AlterTable( + name: "contact_method", + comment: "联系方式", + oldComment: "联系方式新增量主键,更新映射关系"); + + migrationBuilder.AlterColumn( + name: "item_type_id", + table: "user_item_type", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "项目类别ID"); + + migrationBuilder.AlterColumn( + name: "value_option_name", + table: "sys_parm_value_option", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "可选项名"); + + migrationBuilder.AlterColumn( + name: "value_option", + table: "sys_parm_value_option", + type: "character varying(50)", + maxLength: 50, + nullable: false, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldComment: "可选项"); + + migrationBuilder.AlterColumn( + name: "remark", + table: "sys_parm_value", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "备注"); + + migrationBuilder.AlterColumn( + name: "parm_value", + table: "sys_parm_value", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "参数值"); + + migrationBuilder.AlterColumn( + name: "organization_unit_id", + table: "sys_parm_value", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "单位ID"); + + migrationBuilder.AlterColumn( + name: "sys_parm_id", + table: "sys_parm_value", + type: "character varying(50)", + maxLength: 50, + nullable: false, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldComment: "参数ID"); + + migrationBuilder.AlterColumn( + name: "parent_id", + table: "sys_parm_type", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "父ID"); + + migrationBuilder.AlterColumn( + name: "value_type", + table: "sys_parm", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "结果类别"); + + migrationBuilder.AlterColumn( + name: "sys_parm_type_id", + table: "sys_parm", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "参数类别ID"); + + migrationBuilder.AlterColumn( + name: "remark", + table: "sys_parm", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "备注"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "sys_parm", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "参数名"); + + migrationBuilder.AlterColumn( + name: "template_content", + table: "summary_template", + type: "character varying(200)", + maxLength: 200, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true, + oldComment: "模板内容"); + + migrationBuilder.AlterColumn( + name: "summary_title", + table: "sum_summary_header", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "综述标题"); + + migrationBuilder.AlterColumn( + name: "summary_flag", + table: "sum_summary_header", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "综述标志"); + + migrationBuilder.AlterColumn( + name: "patient_register_id", + table: "sum_summary_header", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "病人登记ID"); + + migrationBuilder.AlterColumn( + name: "summary_content", + table: "sum_summary_content", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "建议内容"); + + migrationBuilder.AlterColumn( + name: "sum_summary_header_id", + table: "sum_summary_content", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "建议头ID"); + + migrationBuilder.AlterColumn( + name: "suggestion_title", + table: "sum_suggestion_header", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "建议标题"); + + migrationBuilder.AlterColumn( + name: "suggestion_flag", + table: "sum_suggestion_header", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "建议标志"); + + migrationBuilder.AlterColumn( + name: "patient_register_id", + table: "sum_suggestion_header", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "病人登记ID"); + + migrationBuilder.AlterColumn( + name: "sum_suggestion_header_id", + table: "sum_diagnosis", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "建议头ID"); + + migrationBuilder.AlterColumn( + name: "diagnosis_id", + table: "sum_diagnosis", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "诊断ID"); + + migrationBuilder.AlterColumn( + name: "patient_register_id", + table: "sum_diagnosis", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "病人登记ID"); + + migrationBuilder.AlterColumn( + name: "suggestion_content", + table: "suggestion", + type: "character varying(200)", + maxLength: 200, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true, + oldComment: "建议内容"); + + migrationBuilder.AlterColumn( + name: "diagnosis_id", + table: "suggestion", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "诊断ID"); + + migrationBuilder.AlterColumn( + name: "sms_type_id", + table: "sms_template", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "短信类别ID"); + + migrationBuilder.AlterColumn( + name: "content", + table: "sms_template", + type: "character varying(200)", + maxLength: 200, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true, + oldComment: "短信内容"); + + migrationBuilder.AlterColumn( + name: "sms_type_id", + table: "sms_send", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "短信类别ID"); + + migrationBuilder.AlterColumn( + name: "patient_name", + table: "sms_send", + type: "character varying(16)", + maxLength: 16, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(16)", + oldMaxLength: 16, + oldNullable: true, + oldComment: "姓名"); + + migrationBuilder.AlterColumn( + name: "patient_id", + table: "sms_send", + type: "uuid", + maxLength: 10, + nullable: true, + oldClrType: typeof(Guid), + oldType: "uuid", + oldNullable: true, + oldComment: "人员ID"); + + migrationBuilder.AlterColumn( + name: "mobile_telephone", + table: "sms_send", + type: "character varying(11)", + maxLength: 11, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(11)", + oldMaxLength: 11, + oldNullable: true, + oldComment: "手机号"); + + migrationBuilder.AlterColumn( + name: "is_complete", + table: "sms_send", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是完成"); + + migrationBuilder.AlterColumn( + name: "follow_up_plan_id", + table: "sms_send", + type: "uuid", + nullable: true, + oldClrType: typeof(Guid), + oldType: "uuid", + oldNullable: true, + oldComment: "随访计划ID"); + + migrationBuilder.AlterColumn( + name: "content", + table: "sms_send", + type: "character varying(200)", + maxLength: 200, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true, + oldComment: "短信内容"); + + migrationBuilder.AlterColumn( + name: "upper_diagnosis_id", + table: "sex_hormone_reference_range", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "上限诊断"); + + migrationBuilder.AlterColumn( + name: "sex_hormone_term_id", + table: "sex_hormone_reference_range", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "性激素期限ID"); + + migrationBuilder.AlterColumn( + name: "reference_range_value", + table: "sex_hormone_reference_range", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "参考范围"); + + migrationBuilder.AlterColumn( + name: "lower_diagnosis_id", + table: "sex_hormone_reference_range", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "下限诊断"); + + migrationBuilder.AlterColumn( + name: "item_id", + table: "sex_hormone_reference_range", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "项目编号"); + + migrationBuilder.AlterColumn( + name: "critical_range_value", + table: "sex_hormone_reference_range", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "危急值参考范围"); + + migrationBuilder.AlterColumn( + name: "age_upper_limit", + table: "sex_hormone_reference_range", + type: "smallint", + nullable: false, + defaultValueSql: "200", + oldClrType: typeof(short), + oldType: "smallint", + oldDefaultValueSql: "200", + oldComment: "年龄上限"); + + migrationBuilder.AlterColumn( + name: "age_lower_limit", + table: "sex_hormone_reference_range", + type: "smallint", + nullable: false, + oldClrType: typeof(short), + oldType: "smallint", + oldComment: "年龄下限"); + + migrationBuilder.AlterColumn( + name: "is_complete", + table: "settle_account", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是完成"); + + migrationBuilder.AlterColumn( + name: "completed_time", + table: "settle_account", + type: "timestamp without time zone", + nullable: true, + oldClrType: typeof(DateTime), + oldType: "timestamp without time zone", + oldNullable: true, + oldComment: "结账时间"); + + migrationBuilder.AlterColumn( + name: "completed_by", + table: "settle_account", + type: "character varying(16)", + maxLength: 16, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(16)", + oldMaxLength: 16, + oldNullable: true, + oldComment: "结账人"); + + migrationBuilder.AlterColumn( + name: "valid_period_unit", + table: "service_trades", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "有效期单位"); + + migrationBuilder.AlterColumn( + name: "valid_period_display_name", + table: "service_trades", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "有效期名"); + + migrationBuilder.AlterColumn( + name: "asbitem_id", + table: "sample_group_detail", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "组合项目编号"); + + migrationBuilder.AlterColumn( + name: "sample_type_id", + table: "sample_group", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "标本类型ID"); + + migrationBuilder.AlterColumn( + name: "sample_container_id", + table: "sample_group", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "标本容器ID"); + + migrationBuilder.AlterColumn( + name: "container_color_name", + table: "sample_container", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "颜色名"); + + migrationBuilder.AlterColumn( + name: "container_color", + table: "sample_container", + type: "integer", + nullable: false, + oldClrType: typeof(int), + oldType: "integer", + oldComment: "颜色"); + + migrationBuilder.AlterColumn( + name: "item_type_id", + table: "room", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "项目类别编号"); + + migrationBuilder.AlterColumn( + name: "department_id", + table: "room", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: ""); + + migrationBuilder.AlterColumn( + name: "report_prompt", + table: "result_status", + type: "character varying(8)", + maxLength: 8, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(8)", + oldMaxLength: 8, + oldNullable: true, + oldComment: "报告单提示"); + + migrationBuilder.AlterColumn( + name: "report_font_color", + table: "result_status", + type: "integer", + nullable: false, + oldClrType: typeof(int), + oldType: "integer", + oldComment: "报告单字体颜色"); + + migrationBuilder.AlterColumn( + name: "report_background_color", + table: "result_status", + type: "integer", + nullable: false, + defaultValueSql: "16777215", + oldClrType: typeof(int), + oldType: "integer", + oldDefaultValueSql: "16777215", + oldComment: "报告单背景颜色"); + + migrationBuilder.AlterColumn( + name: "data_input_prompt", + table: "result_status", + type: "character varying(8)", + maxLength: 8, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(8)", + oldMaxLength: 8, + oldNullable: true, + oldComment: "数据录入提示"); + + migrationBuilder.AlterColumn( + name: "data_input_font_color", + table: "result_status", + type: "integer", + nullable: false, + oldClrType: typeof(int), + oldType: "integer", + oldComment: "数据录入字体颜色"); + + migrationBuilder.AlterColumn( + name: "data_input_background_color", + table: "result_status", + type: "integer", + nullable: false, + defaultValueSql: "16777215", + oldClrType: typeof(int), + oldType: "integer", + oldDefaultValueSql: "16777215", + oldComment: "数据录入报告单颜色"); + + migrationBuilder.AlterColumn( + name: "summary_flag", + table: "register_check_summary", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "综述标志"); + + migrationBuilder.AlterColumn( + name: "summary", + table: "register_check_summary", + type: "character varying(500)", + maxLength: 500, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(500)", + oldMaxLength: 500, + oldNullable: true, + oldComment: "综述"); + + migrationBuilder.AlterColumn( + name: "register_check_id", + table: "register_check_summary", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "登记检查ID"); + + migrationBuilder.AlterColumn( + name: "display_order", + table: "register_check_summary", + type: "integer", + nullable: false, + oldClrType: typeof(int), + oldType: "integer", + oldComment: "顺序"); + + migrationBuilder.AlterColumn( + name: "suggestion", + table: "register_check_suggestion", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "建议"); + + migrationBuilder.AlterColumn( + name: "register_check_id", + table: "register_check_suggestion", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "登记检查ID"); + + migrationBuilder.AlterColumn( + name: "display_order", + table: "register_check_suggestion", + type: "integer", + nullable: false, + oldClrType: typeof(int), + oldType: "integer", + oldComment: "显示顺序"); + + migrationBuilder.AlterColumn( + name: "unit", + table: "register_check_item", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "单位"); + + migrationBuilder.AlterColumn( + name: "critical_value", + table: "register_check_item", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "危急值"); + + migrationBuilder.AlterColumn( + name: "critical_range_value", + table: "register_check_item", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "危急值范围"); + + migrationBuilder.AlterColumn( + name: "item_id", + table: "register_check_item", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "项目", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "项目编号"); + + migrationBuilder.AlterColumn( + name: "register_check_id", + table: "register_check_critical_value", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "登记检查ID"); + + migrationBuilder.AlterColumn( + name: "process_type_flag", + table: "register_check_critical_value", + type: "character(1)", + maxLength: 1, + nullable: true, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldNullable: true, + oldComment: "处理类别标志"); + + migrationBuilder.AlterColumn( + name: "item_id", + table: "register_check_critical_value", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "项目编号"); + + migrationBuilder.AlterColumn( + name: "is_complete", + table: "register_check_critical_value", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是否完成"); + + migrationBuilder.AlterColumn( + name: "doctor", + table: "register_check_critical_value", + type: "character varying(16)", + maxLength: 16, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(16)", + oldMaxLength: 16, + oldNullable: true, + oldComment: "处理医生"); + + migrationBuilder.AlterColumn( + name: "critical_value", + table: "register_check_critical_value", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "危急值"); + + migrationBuilder.AlterColumn( + name: "third_info", + table: "register_check", + type: "character varying(80)", + maxLength: 80, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(80)", + oldMaxLength: 80, + oldNullable: true, + oldComment: "第三方信息"); + + migrationBuilder.AlterColumn( + name: "is_lock", + table: "register_check", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是否锁住"); + + migrationBuilder.AlterColumn( + name: "is_audit", + table: "register_check", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是审核"); + + migrationBuilder.AlterColumn( + name: "critical_value_process_flag", + table: "register_check", + type: "character(1)", + maxLength: 1, + nullable: true, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldNullable: true, + oldComment: "危急值处理标志"); + + migrationBuilder.AlterColumn( + name: "critical_value_process_doctor", + table: "register_check", + type: "character varying(16)", + maxLength: 16, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(16)", + oldMaxLength: 16, + oldNullable: true, + oldComment: "危急值处理医生"); + + migrationBuilder.AlterColumn( + name: "critical_value_process_date", + table: "register_check", + type: "date", + nullable: true, + oldClrType: typeof(DateOnly), + oldType: "date", + oldNullable: true, + oldComment: "危急值处理日期"); + + migrationBuilder.AlterColumn( + name: "critical_value_process_content", + table: "register_check", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "危急值处理内容"); + + migrationBuilder.AlterColumn( + name: "critical_value_flag", + table: "register_check", + type: "character(1)", + maxLength: 1, + nullable: true, + defaultValueSql: "0", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldNullable: true, + oldDefaultValueSql: "0", + oldComment: "危急值标志"); + + migrationBuilder.AlterColumn( + name: "critical_value_create_date", + table: "register_check", + type: "date", + nullable: true, + oldClrType: typeof(DateOnly), + oldType: "date", + oldNullable: true, + oldComment: "危急值创建日期"); + + migrationBuilder.AlterColumn( + name: "critical_value", + table: "register_check", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "危急值"); + + migrationBuilder.AlterColumn( + name: "complete_flag", + table: "register_check", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "0", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "0", + oldComment: "完成标志"); + + migrationBuilder.AlterColumn( + name: "check_request_print_times", + table: "register_check", + type: "smallint", + nullable: false, + oldClrType: typeof(short), + oldType: "smallint", + oldComment: "检查申请单打印次数"); + + migrationBuilder.AlterColumn( + name: "check_request_no", + table: "register_check", + type: "uuid", + maxLength: 20, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldMaxLength: 20, + oldComment: "检查单号"); + + migrationBuilder.AlterColumn( + name: "check_doctor_id", + table: "register_check", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "检查医生ID"); + + migrationBuilder.AlterColumn( + name: "check_date", + table: "register_check", + type: "date", + nullable: true, + oldClrType: typeof(DateOnly), + oldType: "date", + oldNullable: true, + oldComment: "检查日期"); + + migrationBuilder.AlterColumn( + name: "auditor_user_id", + table: "register_check", + type: "uuid", + nullable: true, + oldClrType: typeof(Guid), + oldType: "uuid", + oldNullable: true, + oldComment: "审核医生ID"); + + migrationBuilder.AlterColumn( + name: "audit_time", + table: "register_check", + type: "timestamp without time zone", + nullable: true, + oldClrType: typeof(DateTime), + oldType: "timestamp without time zone", + oldNullable: true, + oldComment: "审核时间"); + + migrationBuilder.AlterColumn( + name: "register_asbitem_id", + table: "register_asbitem", + type: "uuid", + nullable: true, + oldClrType: typeof(Guid), + oldType: "uuid", + oldNullable: true, + oldComment: "主键"); + + migrationBuilder.AlterColumn( + name: "lis_request_id", + table: "register_asbitem", + type: "uuid", + maxLength: 20, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldMaxLength: 20, + oldComment: "LIS申请ID"); + + migrationBuilder.AlterColumn( + name: "amount", + table: "register_asbitem", + type: "smallint", + nullable: true, + oldClrType: typeof(short), + oldType: "smallint", + oldNullable: true, + oldComment: "数量"); + + migrationBuilder.AlterColumn( + name: "register_check_id", + table: "register_asbitem", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "检查单ID"); + + migrationBuilder.AlterColumn( + name: "reference_range_value", + table: "reference_range", + type: "character varying(150)", + maxLength: 150, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(150)", + oldMaxLength: 150, + oldNullable: true, + oldComment: "参考范围值数字型保存区间字符型保存文本值"); + + migrationBuilder.AlterColumn( + name: "reference_range_type_flag", + table: "reference_range", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "参考范围类别0-无参考范围,1-数字型,2-字符型,3-性激素"); + + migrationBuilder.AlterColumn( + name: "critical_range_value", + table: "reference_range", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "危急值"); + + migrationBuilder.AlterColumn( + name: "room_id", + table: "queue_register", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "房间ID"); + + migrationBuilder.AlterColumn( + name: "patient_register_id", + table: "queue_register", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "病人登记ID"); + + migrationBuilder.AlterColumn( + name: "no_complete_reason", + table: "queue_register", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "0", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "0", + oldComment: "未完成原因"); + + migrationBuilder.AlterColumn( + name: "display_order", + table: "queue_register", + type: "integer", + nullable: false, + oldClrType: typeof(int), + oldType: "integer", + oldComment: "排队顺序"); + + migrationBuilder.AlterColumn( + name: "complete_flag", + table: "queue_register", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "0", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "0", + oldComment: "完成标志"); + + migrationBuilder.AlterColumn( + name: "call_time", + table: "queue_register", + type: "timestamp without time zone", + nullable: true, + oldClrType: typeof(DateTime), + oldType: "timestamp without time zone", + oldNullable: true, + oldComment: "叫号时间"); + + migrationBuilder.AlterColumn( + name: "price_item_code", + table: "price_item", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "价表编码"); + + migrationBuilder.AlterColumn( + name: "price", + table: "price_item", + type: "numeric(10,2)", + precision: 10, + scale: 2, + nullable: false, + oldClrType: typeof(decimal), + oldType: "numeric(10,2)", + oldPrecision: 10, + oldScale: 2, + oldComment: "价格"); + + migrationBuilder.AlterColumn( + name: "invoice_item_type_id", + table: "price_item", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "发票项目类别ID"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "price_item", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "reply_content", + table: "phone_follow", + type: "character varying(200)", + maxLength: 200, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true, + oldComment: "回复内容"); + + migrationBuilder.AlterColumn( + name: "patient_register_id", + table: "phone_follow", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "病人登记ID"); + + migrationBuilder.AlterColumn( + name: "follow_up_plan_id", + table: "phone_follow", + type: "uuid", + nullable: true, + oldClrType: typeof(Guid), + oldType: "uuid", + oldNullable: true, + oldComment: "随访计划ID"); + + migrationBuilder.AlterColumn( + name: "follow_content", + table: "phone_follow", + type: "character varying(200)", + maxLength: 200, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true, + oldComment: "随访内容"); + + migrationBuilder.AlterColumn( + name: "id", + table: "pay_mode", + type: "character(4)", + fixedLength: true, + maxLength: 4, + nullable: false, + oldClrType: typeof(string), + oldType: "character(4)", + oldFixedLength: true, + oldMaxLength: 4, + oldComment: "编号,固定编码"); + + migrationBuilder.AlterColumn( + name: "telephone", + table: "patient", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "电话"); + + migrationBuilder.AlterColumn( + name: "sex_id", + table: "patient", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "性别"); + + migrationBuilder.AlterColumn( + name: "postal_code", + table: "patient", + type: "character varying(10)", + maxLength: 10, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(10)", + oldMaxLength: 10, + oldNullable: true, + oldComment: "邮政编码"); + + migrationBuilder.AlterColumn( + name: "patient_password", + table: "patient", + type: "character varying(10)", + maxLength: 10, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(10)", + oldMaxLength: 10, + oldNullable: true, + oldComment: "登录密码"); + + migrationBuilder.AlterColumn( + name: "nation_id", + table: "patient", + type: "uuid", + fixedLength: true, + nullable: true, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldNullable: true, + oldComment: "民族编号"); + + migrationBuilder.AlterColumn( + name: "mobile_telephone", + table: "patient", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "手机号"); + + migrationBuilder.AlterColumn( + name: "marital_status_id", + table: "patient", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "婚姻状况"); + + migrationBuilder.AlterColumn( + name: "id_no", + table: "patient", + type: "character varying(18)", + maxLength: 18, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(18)", + oldMaxLength: 18, + oldNullable: true, + oldComment: "身份证号"); + + migrationBuilder.AlterColumn( + name: "email", + table: "patient", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "email"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "patient", + type: "character varying(30)", + maxLength: 30, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(30)", + oldMaxLength: 30, + oldNullable: true, + oldComment: "姓名"); + + migrationBuilder.AlterColumn( + name: "birth_place_id", + table: "patient", + type: "uuid", + fixedLength: true, + nullable: true, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldNullable: true, + oldComment: "出生地"); + + migrationBuilder.AlterColumn( + name: "birth_date", + table: "patient", + type: "date", + nullable: true, + oldClrType: typeof(DateOnly), + oldType: "date", + oldNullable: true, + oldComment: "出生日期"); + + migrationBuilder.AlterColumn( + name: "address", + table: "patient", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "地址"); + + migrationBuilder.AddColumn( + name: "PatientNo", + table: "patient", + type: "text", + nullable: true); + + migrationBuilder.AlterColumn( + name: "organization_unit_id", + table: "organization_units_customer_org", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "体检中心编号"); + + migrationBuilder.AlterColumn( + name: "customer_org_id", + table: "organization_units_customer_org", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "客户单位编号"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "medical_report_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "asbitem_id", + table: "medical_package_detail", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "组合项目编号"); + + migrationBuilder.AlterColumn( + name: "sign_in_time", + table: "lis_request", + type: "date", + nullable: true, + oldClrType: typeof(DateOnly), + oldType: "date", + oldNullable: true, + oldComment: "签收时间"); + + migrationBuilder.AlterColumn( + name: "sign_in_person", + table: "lis_request", + type: "character varying(16)", + maxLength: 16, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(16)", + oldMaxLength: 16, + oldNullable: true, + oldComment: "签收人姓名"); + + migrationBuilder.AlterColumn( + name: "sign_in_order", + table: "lis_request", + type: "integer", + nullable: true, + oldClrType: typeof(int), + oldType: "integer", + oldNullable: true, + oldComment: "签收顺序"); + + migrationBuilder.AlterColumn( + name: "sampling_time", + table: "lis_request", + type: "date", + nullable: true, + oldClrType: typeof(DateOnly), + oldType: "date", + oldNullable: true, + oldComment: "采样时间"); + + migrationBuilder.AlterColumn( + name: "sampler", + table: "lis_request", + type: "character varying(16)", + maxLength: 16, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(16)", + oldMaxLength: 16, + oldNullable: true, + oldComment: "采样人姓名"); + + migrationBuilder.AlterColumn( + name: "sample_type_id", + table: "lis_request", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "标本类型"); + + migrationBuilder.AlterColumn( + name: "sample_container_id", + table: "lis_request", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "标本容器编号"); + + migrationBuilder.AlterColumn( + name: "patient_register_id", + table: "lis_request", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "病人登记ID"); + + migrationBuilder.AlterColumn( + name: "lis_request_no", + table: "lis_request", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "检验申请单号"); + + migrationBuilder.AlterColumn( + name: "is_sign_in", + table: "lis_request", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是签收"); + + migrationBuilder.AlterColumn( + name: "is_print", + table: "lis_request", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是否已打印"); + + migrationBuilder.AlterColumn( + name: "simple_code", + table: "item_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "自定义简码"); + + migrationBuilder.AlterColumn( + name: "path_code", + table: "item_type", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "路径编码"); + + migrationBuilder.AlterColumn( + name: "parent_id", + table: "item_type", + type: "uuid", + fixedLength: true, + nullable: true, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldNullable: true, + oldComment: "父id"); + + migrationBuilder.AlterColumn( + name: "medical_report_type_id", + table: "item_type", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "体检报告类别"); + + migrationBuilder.AlterColumn( + name: "is_merge_asbitem", + table: "item_type", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "合并组合项目,Y-是,N-否"); + + migrationBuilder.AlterColumn( + name: "guid_type_id", + table: "item_type", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "指引类别"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "item_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "check_type_flag", + table: "item_type", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "'G'::bpchar", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "'G'::bpchar", + oldComment: "检查类别,0-普通检查,1-检验,2-影像检查"); + + migrationBuilder.AlterColumn( + name: "item_id", + table: "item_template_detail", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "项目编号"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "item_default_result", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "unit_id", + table: "item", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "单位"); + + migrationBuilder.AlterColumn( + name: "result_template_type_flag", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "0", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "0", + oldComment: "结果模板类别标志"); + + migrationBuilder.AlterColumn( + name: "reference_range_type_flag", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "'E'::bpchar", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "'E'::bpchar", + oldComment: "参考范围类别0-无参考范围,1-数字型,2-字符型,3-性激素"); + + migrationBuilder.AlterColumn( + name: "price_item_id", + table: "item", + type: "uuid", + fixedLength: true, + maxLength: 8, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldMaxLength: 8, + oldComment: "价表项目编码"); + + migrationBuilder.AlterColumn( + name: "price", + table: "item", + type: "numeric(10,2)", + precision: 10, + scale: 2, + nullable: false, + oldClrType: typeof(decimal), + oldType: "numeric(10,2)", + oldPrecision: 10, + oldScale: 2, + oldComment: "价格"); + + migrationBuilder.AlterColumn( + name: "item_type_id", + table: "item", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "项目类别"); + + migrationBuilder.AlterColumn( + name: "is_produce_summary", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是生成小结"); + + migrationBuilder.AlterColumn( + name: "is_name_into_summary", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "名称进入小结"); + + migrationBuilder.AlterColumn( + name: "is_diagnosis_function", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "启用诊断函数"); + + migrationBuilder.AlterColumn( + name: "is_continue_process", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是继续处理"); + + migrationBuilder.AlterColumn( + name: "is_calculation_item", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是计算项目"); + + migrationBuilder.AlterColumn( + name: "is_active", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "启用"); + + migrationBuilder.AlterColumn( + name: "input_check", + table: "item", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "输入结果校验公式"); + + migrationBuilder.AlterColumn( + name: "english_short_name", + table: "item", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "英文缩写"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "item", + type: "character varying(30)", + maxLength: 30, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(30)", + oldMaxLength: 30, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "diagnosis_function", + table: "item", + type: "character varying(2000)", + maxLength: 2000, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(2000)", + oldMaxLength: 2000, + oldNullable: true, + oldComment: "诊断函数"); + + migrationBuilder.AlterColumn( + name: "default_result", + table: "item", + type: "character varying(200)", + maxLength: 200, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true, + oldComment: "默认结果"); + + migrationBuilder.AlterColumn( + name: "calculation_function", + table: "item", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "计算函数"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "invoice_org", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "invoice_item_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "patient_register_no", + table: "import_pacs_result", + type: "character varying(12)", + maxLength: 12, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(12)", + oldMaxLength: 12, + oldNullable: true, + oldComment: "人员登记号"); + + migrationBuilder.AlterColumn( + name: "is_print", + table: "import_pacs_picture", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "检查所见", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是否打印"); + + migrationBuilder.AlterColumn( + name: "check_request_no", + table: "import_pacs_picture", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "检查申请单号"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "guide_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "follow_up_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "remark", + table: "follow_up_plan", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "备注"); + + migrationBuilder.AlterColumn( + name: "perfom_user_id", + table: "follow_up_plan", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "执行者用户ID"); + + migrationBuilder.AlterColumn( + name: "perfom_time", + table: "follow_up_plan", + type: "timestamp without time zone", + nullable: true, + oldClrType: typeof(DateTime), + oldType: "timestamp without time zone", + oldNullable: true, + oldComment: "执行时间"); + + migrationBuilder.AlterColumn( + name: "perfom_flag", + table: "follow_up_plan", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "执行标志"); + + migrationBuilder.AlterColumn( + name: "is_loop", + table: "follow_up_plan", + type: "character(1)", + maxLength: 1, + nullable: true, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldNullable: true, + oldComment: "是否循环"); + + migrationBuilder.AlterColumn( + name: "follow_up_type_id", + table: "follow_up_plan", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "随访类别"); + + migrationBuilder.AlterColumn( + name: "follow_up_mode_id", + table: "follow_up_plan", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "随访方式"); + + migrationBuilder.AlterColumn( + name: "doctor_user_id", + table: "follow_up_plan", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "医生"); + + migrationBuilder.AlterColumn( + name: "cycle_days", + table: "follow_up_plan", + type: "smallint", + nullable: false, + oldClrType: typeof(short), + oldType: "smallint", + oldComment: "周期天数"); + + migrationBuilder.AlterColumn( + name: "content", + table: "follow_up_plan", + type: "character varying(200)", + maxLength: 200, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true, + oldComment: "随访内容"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "follow_up_mode", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "path_code", + table: "diagnosis_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "路径编码"); + + migrationBuilder.AlterColumn( + name: "parent_id", + table: "diagnosis_type", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "父编号"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "diagnosis_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "diagnosis_id", + table: "diagnosis_template_detail", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "诊断编号"); + + migrationBuilder.AlterColumn( + name: "diagnosis_template_id", + table: "diagnosis_template_detail", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "诊断模板编号"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "diagnosis_template", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "diagnosis_postfix", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "suggestion_name", + table: "diagnosis", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "建议名称"); + + migrationBuilder.AlterColumn( + name: "item_type_id", + table: "diagnosis", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "项目类别"); + + migrationBuilder.AlterColumn( + name: "is_summary_template", + table: "diagnosis", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是总检模板"); + + migrationBuilder.AlterColumn( + name: "is_ill", + table: "diagnosis", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是疾病"); + + migrationBuilder.AlterColumn( + name: "for_sex_id", + table: "diagnosis", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "'A'::bpchar", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "'A'::bpchar", + oldComment: "适用性别"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "diagnosis", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "diagnosis_level_id", + table: "diagnosis", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "诊断级别"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "customer_org_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "register_no", + table: "customer_org_register", + type: "character varying(12)", + maxLength: 12, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(12)", + oldMaxLength: 12, + oldNullable: true, + oldComment: "计划号"); + + migrationBuilder.AlterColumn( + name: "register_name", + table: "customer_org_register", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "计划名称"); + + migrationBuilder.AlterColumn( + name: "price", + table: "customer_org_group_detail", + type: "numeric(10,2)", + precision: 10, + scale: 2, + nullable: false, + oldClrType: typeof(decimal), + oldType: "numeric(10,2)", + oldPrecision: 10, + oldScale: 2, + oldComment: "价格"); + + migrationBuilder.AlterColumn( + name: "asbitem_id", + table: "customer_org_group_detail", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "组合项目编号"); + + migrationBuilder.AlterColumn( + name: "customer_org_group_id", + table: "customer_org_group_detail", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "分组编号"); + + migrationBuilder.AlterColumn( + name: "pay_mode_id", + table: "customer_org_charge_pay", + type: "character(4)", + fixedLength: true, + maxLength: 4, + nullable: true, + oldClrType: typeof(string), + oldType: "character(4)", + oldFixedLength: true, + oldMaxLength: 4, + oldNullable: true, + oldComment: "支付方式"); + + migrationBuilder.AlterColumn( + name: "charge_money", + table: "customer_org_charge_pay", + type: "numeric(10,2)", + precision: 10, + scale: 2, + nullable: false, + oldClrType: typeof(decimal), + oldType: "numeric(10,2)", + oldPrecision: 10, + oldScale: 2, + oldComment: "支付金额"); + + migrationBuilder.AlterColumn( + name: "back_moeny", + table: "customer_org_charge_back_pay", + type: "numeric(10,2)", + precision: 10, + scale: 2, + nullable: false, + oldClrType: typeof(decimal), + oldType: "numeric(10,2)", + oldPrecision: 10, + oldScale: 2, + oldComment: "退费金额"); + + migrationBuilder.AlterColumn( + name: "pay_mode_id", + table: "customer_org_charge_back_pay", + type: "character(4)", + fixedLength: true, + maxLength: 4, + nullable: false, + oldClrType: typeof(string), + oldType: "character(4)", + oldFixedLength: true, + oldMaxLength: 4, + oldComment: "支付方式"); + + migrationBuilder.AlterColumn( + name: "settle_account_id", + table: "customer_org_charge_back", + type: "uuid", + nullable: true, + oldClrType: typeof(Guid), + oldType: "uuid", + oldNullable: true, + oldComment: "结算账户ID"); + + migrationBuilder.AlterColumn( + name: "customer_org_charge_id", + table: "customer_org_charge_back", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "收费编号"); + + migrationBuilder.AlterColumn( + name: "settle_account_id", + table: "customer_org_charge", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "结算账户ID"); + + migrationBuilder.AlterColumn( + name: "payer", + table: "customer_org_charge", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "付款人"); + + migrationBuilder.AlterColumn( + name: "customer_org_register_id", + table: "customer_org_charge", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "客户单位登记ID"); + + migrationBuilder.AlterColumn( + name: "charge_flag", + table: "customer_org_charge", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "收退费标志"); + + migrationBuilder.AlterColumn( + name: "status_flag", + table: "customer_org", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "0", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "0", + oldComment: "状态"); + + migrationBuilder.AlterColumn( + name: "short_name", + table: "customer_org", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "简称"); + + migrationBuilder.AlterColumn( + name: "path_code", + table: "customer_org", + type: "character varying(60)", + maxLength: 60, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(60)", + oldMaxLength: 60, + oldNullable: true, + oldComment: "路径编码"); + + migrationBuilder.AlterColumn( + name: "parent_id", + table: "customer_org", + type: "uuid", + fixedLength: true, + nullable: true, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldNullable: true, + oldComment: "父编号"); + + migrationBuilder.AlterColumn( + name: "is_lock", + table: "customer_org", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "锁住"); + + migrationBuilder.AlterColumn( + name: "invoice_name", + table: "customer_org", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "开票名称"); + + migrationBuilder.AlterColumn( + name: "path_code", + table: "critical_value_type", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "路径编码"); + + migrationBuilder.AlterColumn( + name: "parent_id", + table: "critical_value_type", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "父编号"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "critical_value_type", + type: "character varying(40)", + maxLength: 40, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(40)", + oldMaxLength: 40, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "critical_value", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "critical_value_type_id", + table: "critical_value", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "危急值类别编号"); + + migrationBuilder.AlterColumn( + name: "title", + table: "contact_person", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "职务"); + + migrationBuilder.AlterColumn( + name: "remark", + table: "contact_person", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "备注"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "contact_person", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "姓名"); + + migrationBuilder.AlterColumn( + name: "customer_org_id", + table: "contact_person", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "客户单位编号"); + + migrationBuilder.AlterColumn( + name: "contact_method_value", + table: "contact_method", + type: "character varying(15)", + maxLength: 15, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(15)", + oldMaxLength: 15, + oldNullable: true, + oldComment: "联系方式,比如18911254911,839860190@qq.com"); + + migrationBuilder.AlterColumn( + name: "contact_method_type", + table: "contact_method", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "'M'::bpchar", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "'M'::bpchar", + oldComment: "联系方式类别-比如0-手机、1-电子邮箱"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "common_char_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "common_char", + type: "character varying(1)", + maxLength: 1, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(1)", + oldMaxLength: 1, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "common_char_type_id", + table: "common_char", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "常用字符类别编号"); + + migrationBuilder.AlterColumn( + name: "back_moeny", + table: "charge_back_pay", + type: "numeric(10,2)", + precision: 10, + scale: 2, + nullable: false, + oldClrType: typeof(decimal), + oldType: "numeric(10,2)", + oldPrecision: 10, + oldScale: 2, + oldComment: "退费金额"); + + migrationBuilder.AlterColumn( + name: "pay_mode_id", + table: "charge_back_pay", + type: "character(4)", + fixedLength: true, + maxLength: 4, + nullable: false, + oldClrType: typeof(string), + oldType: "character(4)", + oldFixedLength: true, + oldMaxLength: 4, + oldComment: "支付方式ID"); + + migrationBuilder.AlterColumn( + name: "settle_account_id", + table: "charge_back", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "结账ID"); + + migrationBuilder.AlterColumn( + name: "settle_account_id", + table: "charge", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "结账ID"); + + migrationBuilder.AlterColumn( + name: "country_code", + table: "birth_place", + type: "character varying(6)", + maxLength: 6, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(6)", + oldMaxLength: 6, + oldNullable: true, + oldComment: "国家标准码"); + + migrationBuilder.AlterColumn( + name: "path_code", + table: "bigtext_result_type", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "路径编码"); + + migrationBuilder.AlterColumn( + name: "parent_id", + table: "bigtext_result_type", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "父编号"); + + migrationBuilder.AlterColumn( + name: "item_type_id", + table: "bigtext_result_type", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "项目类别"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "bigtext_result_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "bigtext_result_template", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "bigtext_result_type_id", + table: "bigtext_result_template", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "结果类别编号"); + + migrationBuilder.AlterColumn( + name: "description", + table: "bigtext_result_description", + type: "character varying(200)", + maxLength: 200, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true, + oldComment: "描述"); + + migrationBuilder.AlterColumn( + name: "conclusion", + table: "bigtext_result_conclusion", + type: "character varying(200)", + maxLength: 200, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true, + oldComment: "结论"); + + migrationBuilder.AlterColumn( + name: "price_item_id", + table: "asbitem_price_item", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "价表项目编码"); + + migrationBuilder.AlterColumn( + name: "asbitem_id", + table: "asbitem_price_item", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "组合项目编号"); + + migrationBuilder.AlterColumn( + name: "amount", + table: "asbitem_price_item", + type: "smallint", + nullable: true, + oldClrType: typeof(short), + oldType: "smallint", + oldNullable: true, + oldComment: "数量"); + + migrationBuilder.AlterColumn( + name: "guide", + table: "asbitem_guide", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "指引单内容"); + + migrationBuilder.AlterColumn( + name: "for_sex_id", + table: "asbitem_guide", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "适用性别ID"); + + migrationBuilder.AlterColumn( + name: "asbitem_id", + table: "asbitem_guide", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "组合项目ID"); + + migrationBuilder.AlterColumn( + name: "organization_unit_id", + table: "asbitem_guide", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "单位科室ID"); + + migrationBuilder.AlterColumn( + name: "item_id", + table: "asbitem_detail", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "项目编码"); + + migrationBuilder.AlterColumn( + name: "short_name", + table: "asbitem", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "简称"); + + migrationBuilder.AlterColumn( + name: "queue_time", + table: "asbitem", + type: "numeric(3,1)", + precision: 3, + scale: 1, + nullable: false, + oldClrType: typeof(decimal), + oldType: "numeric(3,1)", + oldPrecision: 3, + oldScale: 1, + oldComment: "候诊时间"); + + migrationBuilder.AlterColumn( + name: "price", + table: "asbitem", + type: "numeric(8,2)", + precision: 8, + scale: 2, + nullable: false, + oldClrType: typeof(decimal), + oldType: "numeric(8,2)", + oldPrecision: 8, + oldScale: 2, + oldComment: "价格"); + + migrationBuilder.AlterColumn( + name: "item_type_id", + table: "asbitem", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "项目类别"); + + migrationBuilder.AlterColumn( + name: "is_picture_rotate", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "体检报告图片旋转90°"); + + migrationBuilder.AlterColumn( + name: "is_item_result_merger", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "项目结果合并"); + + migrationBuilder.AlterColumn( + name: "is_diagnosis_function", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "启用诊断函数"); + + migrationBuilder.AlterColumn( + name: "is_continue_process", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "诊断函数处理完毕后继续处理"); + + migrationBuilder.AlterColumn( + name: "is_check", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是检查项目"); + + migrationBuilder.AlterColumn( + name: "is_before_eat", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "餐前项目"); + + migrationBuilder.AlterColumn( + name: "is_active", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是启用"); + + migrationBuilder.AlterColumn( + name: "invoice_item_type_id", + table: "asbitem", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "发票类别"); + + migrationBuilder.AlterColumn( + name: "for_sex_id", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "'A'::bpchar", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "'A'::bpchar", + oldComment: "适用性别,M-男,F-女,A-全部"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "asbitem", + type: "character varying(30)", + maxLength: 30, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(30)", + oldMaxLength: 30, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "diagnosis_function", + table: "asbitem", + type: "character varying(1000)", + maxLength: 1000, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(1000)", + oldMaxLength: 1000, + oldNullable: true, + oldComment: "诊断函数"); + + migrationBuilder.AlterColumn( + name: "device_type_id", + table: "asbitem", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "仪器类别"); + + migrationBuilder.AlterColumn( + name: "default_result", + table: "asbitem", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "默认结果"); + + migrationBuilder.AlterColumn( + name: "clinical_meaning", + table: "asbitem", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "临床意义"); + + migrationBuilder.CreateIndex( + name: "IX_patient_PatientNo", + table: "patient", + column: "PatientNo", + unique: true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropIndex( + name: "IX_patient_PatientNo", + table: "patient"); + + migrationBuilder.DropColumn( + name: "PatientNo", + table: "patient"); + + migrationBuilder.AlterTable( + name: "users", + comment: "用户表,废弃"); + + migrationBuilder.AlterTable( + name: "user_rights", + comment: "用户控件权限-废弃"); + + migrationBuilder.AlterTable( + name: "user_grouping", + comment: "用户组权限-废弃"); + + migrationBuilder.AlterTable( + name: "user_department", + comment: "用户科室操作权限,废弃", + oldComment: "用户科室操作权限"); + + migrationBuilder.AlterTable( + name: "sysdiagrams", + comment: "不是本软件的表,估计是系统自动生成的"); + + migrationBuilder.AlterTable( + name: "sms_type", + comment: "短信类别"); + + migrationBuilder.AlterTable( + name: "sms_template", + comment: "短信模板"); + + migrationBuilder.AlterTable( + name: "sms_send", + comment: "短信发送"); + + migrationBuilder.AlterTable( + name: "primarykey_builder", + comment: "主键产生器,废弃", + oldComment: "主键产生器"); + + migrationBuilder.AlterTable( + name: "patient_symptom", + comment: "职业病-体检病人症状"); + + migrationBuilder.AlterTable( + name: "operate_log", + comment: "作日志,已经废弃", + oldComment: "操作日志"); + + migrationBuilder.AlterTable( + name: "grouping", + comment: "废弃"); + + migrationBuilder.AlterTable( + name: "for_sex", + comment: "适用性别设置,固定编码", + oldComment: "可支持性别设置"); + + migrationBuilder.AlterTable( + name: "follow_up_type", + comment: "随访类别"); + + migrationBuilder.AlterTable( + name: "follow_up_plan", + comment: "随访计划"); + + migrationBuilder.AlterTable( + name: "follow_up_mode", + comment: "随访方式"); + + migrationBuilder.AlterTable( + name: "department", + comment: "部门,已经废弃", + oldComment: "部门"); + + migrationBuilder.AlterTable( + name: "customer_org_type", + comment: "客户单位类别", + oldComment: "团体类型设置"); + + migrationBuilder.AlterTable( + name: "contact_method", + comment: "联系方式新增量主键,更新映射关系", + oldComment: "联系方式"); + + migrationBuilder.AlterColumn( + name: "item_type_id", + table: "user_item_type", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "项目类别ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "value_option_name", + table: "sys_parm_value_option", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "可选项名", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "value_option", + table: "sys_parm_value_option", + type: "character varying(50)", + maxLength: 50, + nullable: false, + comment: "可选项", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "remark", + table: "sys_parm_value", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "备注", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "parm_value", + table: "sys_parm_value", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "参数值", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "organization_unit_id", + table: "sys_parm_value", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "单位ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "sys_parm_id", + table: "sys_parm_value", + type: "character varying(50)", + maxLength: 50, + nullable: false, + comment: "参数ID", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "parent_id", + table: "sys_parm_type", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "父ID", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "value_type", + table: "sys_parm", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "结果类别", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "sys_parm_type_id", + table: "sys_parm", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "参数类别ID", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "remark", + table: "sys_parm", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "备注", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "sys_parm", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "参数名", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "template_content", + table: "summary_template", + type: "character varying(200)", + maxLength: 200, + nullable: true, + comment: "模板内容", + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "summary_title", + table: "sum_summary_header", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "综述标题", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "summary_flag", + table: "sum_summary_header", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "综述标志", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "patient_register_id", + table: "sum_summary_header", + type: "uuid", + nullable: false, + comment: "病人登记ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "summary_content", + table: "sum_summary_content", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "建议内容", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "sum_summary_header_id", + table: "sum_summary_content", + type: "uuid", + nullable: false, + comment: "建议头ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "suggestion_title", + table: "sum_suggestion_header", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "建议标题", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "suggestion_flag", + table: "sum_suggestion_header", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "建议标志", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "patient_register_id", + table: "sum_suggestion_header", + type: "uuid", + nullable: false, + comment: "病人登记ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "sum_suggestion_header_id", + table: "sum_diagnosis", + type: "uuid", + nullable: false, + comment: "建议头ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "diagnosis_id", + table: "sum_diagnosis", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "诊断ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "patient_register_id", + table: "sum_diagnosis", + type: "uuid", + nullable: false, + comment: "病人登记ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "suggestion_content", + table: "suggestion", + type: "character varying(200)", + maxLength: 200, + nullable: true, + comment: "建议内容", + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "diagnosis_id", + table: "suggestion", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "诊断ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "sms_type_id", + table: "sms_template", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "短信类别ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "content", + table: "sms_template", + type: "character varying(200)", + maxLength: 200, + nullable: true, + comment: "短信内容", + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "sms_type_id", + table: "sms_send", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "短信类别ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "patient_name", + table: "sms_send", + type: "character varying(16)", + maxLength: 16, + nullable: true, + comment: "姓名", + oldClrType: typeof(string), + oldType: "character varying(16)", + oldMaxLength: 16, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "patient_id", + table: "sms_send", + type: "uuid", + nullable: true, + comment: "人员ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldMaxLength: 10, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "mobile_telephone", + table: "sms_send", + type: "character varying(11)", + maxLength: 11, + nullable: true, + comment: "手机号", + oldClrType: typeof(string), + oldType: "character varying(11)", + oldMaxLength: 11, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "is_complete", + table: "sms_send", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是完成", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "follow_up_plan_id", + table: "sms_send", + type: "uuid", + nullable: true, + comment: "随访计划ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "content", + table: "sms_send", + type: "character varying(200)", + maxLength: 200, + nullable: true, + comment: "短信内容", + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "upper_diagnosis_id", + table: "sex_hormone_reference_range", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "上限诊断", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "sex_hormone_term_id", + table: "sex_hormone_reference_range", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "性激素期限ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "reference_range_value", + table: "sex_hormone_reference_range", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "参考范围", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "lower_diagnosis_id", + table: "sex_hormone_reference_range", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "下限诊断", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "item_id", + table: "sex_hormone_reference_range", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "项目编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "critical_range_value", + table: "sex_hormone_reference_range", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "危急值参考范围", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "age_upper_limit", + table: "sex_hormone_reference_range", + type: "smallint", + nullable: false, + defaultValueSql: "200", + comment: "年龄上限", + oldClrType: typeof(short), + oldType: "smallint", + oldDefaultValueSql: "200"); + + migrationBuilder.AlterColumn( + name: "age_lower_limit", + table: "sex_hormone_reference_range", + type: "smallint", + nullable: false, + comment: "年龄下限", + oldClrType: typeof(short), + oldType: "smallint"); + + migrationBuilder.AlterColumn( + name: "is_complete", + table: "settle_account", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是完成", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "completed_time", + table: "settle_account", + type: "timestamp without time zone", + nullable: true, + comment: "结账时间", + oldClrType: typeof(DateTime), + oldType: "timestamp without time zone", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "completed_by", + table: "settle_account", + type: "character varying(16)", + maxLength: 16, + nullable: true, + comment: "结账人", + oldClrType: typeof(string), + oldType: "character varying(16)", + oldMaxLength: 16, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "valid_period_unit", + table: "service_trades", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "有效期单位", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "valid_period_display_name", + table: "service_trades", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "有效期名", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "asbitem_id", + table: "sample_group_detail", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "组合项目编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "sample_type_id", + table: "sample_group", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "标本类型ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "sample_container_id", + table: "sample_group", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "标本容器ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "container_color_name", + table: "sample_container", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "颜色名", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "container_color", + table: "sample_container", + type: "integer", + nullable: false, + comment: "颜色", + oldClrType: typeof(int), + oldType: "integer"); + + migrationBuilder.AlterColumn( + name: "item_type_id", + table: "room", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "项目类别编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "department_id", + table: "room", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "report_prompt", + table: "result_status", + type: "character varying(8)", + maxLength: 8, + nullable: true, + comment: "报告单提示", + oldClrType: typeof(string), + oldType: "character varying(8)", + oldMaxLength: 8, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "report_font_color", + table: "result_status", + type: "integer", + nullable: false, + comment: "报告单字体颜色", + oldClrType: typeof(int), + oldType: "integer"); + + migrationBuilder.AlterColumn( + name: "report_background_color", + table: "result_status", + type: "integer", + nullable: false, + defaultValueSql: "16777215", + comment: "报告单背景颜色", + oldClrType: typeof(int), + oldType: "integer", + oldDefaultValueSql: "16777215"); + + migrationBuilder.AlterColumn( + name: "data_input_prompt", + table: "result_status", + type: "character varying(8)", + maxLength: 8, + nullable: true, + comment: "数据录入提示", + oldClrType: typeof(string), + oldType: "character varying(8)", + oldMaxLength: 8, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "data_input_font_color", + table: "result_status", + type: "integer", + nullable: false, + comment: "数据录入字体颜色", + oldClrType: typeof(int), + oldType: "integer"); + + migrationBuilder.AlterColumn( + name: "data_input_background_color", + table: "result_status", + type: "integer", + nullable: false, + defaultValueSql: "16777215", + comment: "数据录入报告单颜色", + oldClrType: typeof(int), + oldType: "integer", + oldDefaultValueSql: "16777215"); + + migrationBuilder.AlterColumn( + name: "summary_flag", + table: "register_check_summary", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "综述标志", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "summary", + table: "register_check_summary", + type: "character varying(500)", + maxLength: 500, + nullable: true, + comment: "综述", + oldClrType: typeof(string), + oldType: "character varying(500)", + oldMaxLength: 500, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "register_check_id", + table: "register_check_summary", + type: "uuid", + nullable: false, + comment: "登记检查ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "display_order", + table: "register_check_summary", + type: "integer", + nullable: false, + comment: "顺序", + oldClrType: typeof(int), + oldType: "integer"); + + migrationBuilder.AlterColumn( + name: "suggestion", + table: "register_check_suggestion", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "建议", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "register_check_id", + table: "register_check_suggestion", + type: "uuid", + nullable: false, + comment: "登记检查ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "display_order", + table: "register_check_suggestion", + type: "integer", + nullable: false, + comment: "显示顺序", + oldClrType: typeof(int), + oldType: "integer"); + + migrationBuilder.AlterColumn( + name: "unit", + table: "register_check_item", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "单位", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "critical_value", + table: "register_check_item", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "危急值", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "critical_range_value", + table: "register_check_item", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "危急值范围", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "item_id", + table: "register_check_item", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "项目编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "项目"); + + migrationBuilder.AlterColumn( + name: "register_check_id", + table: "register_check_critical_value", + type: "uuid", + nullable: false, + comment: "登记检查ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "process_type_flag", + table: "register_check_critical_value", + type: "character(1)", + maxLength: 1, + nullable: true, + comment: "处理类别标志", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "item_id", + table: "register_check_critical_value", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "项目编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "is_complete", + table: "register_check_critical_value", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是否完成", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "doctor", + table: "register_check_critical_value", + type: "character varying(16)", + maxLength: 16, + nullable: true, + comment: "处理医生", + oldClrType: typeof(string), + oldType: "character varying(16)", + oldMaxLength: 16, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "critical_value", + table: "register_check_critical_value", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "危急值", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "third_info", + table: "register_check", + type: "character varying(80)", + maxLength: 80, + nullable: true, + comment: "第三方信息", + oldClrType: typeof(string), + oldType: "character varying(80)", + oldMaxLength: 80, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "is_lock", + table: "register_check", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是否锁住", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_audit", + table: "register_check", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是审核", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "critical_value_process_flag", + table: "register_check", + type: "character(1)", + maxLength: 1, + nullable: true, + comment: "危急值处理标志", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "critical_value_process_doctor", + table: "register_check", + type: "character varying(16)", + maxLength: 16, + nullable: true, + comment: "危急值处理医生", + oldClrType: typeof(string), + oldType: "character varying(16)", + oldMaxLength: 16, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "critical_value_process_date", + table: "register_check", + type: "date", + nullable: true, + comment: "危急值处理日期", + oldClrType: typeof(DateOnly), + oldType: "date", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "critical_value_process_content", + table: "register_check", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "危急值处理内容", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "critical_value_flag", + table: "register_check", + type: "character(1)", + maxLength: 1, + nullable: true, + defaultValueSql: "0", + comment: "危急值标志", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldNullable: true, + oldDefaultValueSql: "0"); + + migrationBuilder.AlterColumn( + name: "critical_value_create_date", + table: "register_check", + type: "date", + nullable: true, + comment: "危急值创建日期", + oldClrType: typeof(DateOnly), + oldType: "date", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "critical_value", + table: "register_check", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "危急值", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "complete_flag", + table: "register_check", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "0", + comment: "完成标志", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "0"); + + migrationBuilder.AlterColumn( + name: "check_request_print_times", + table: "register_check", + type: "smallint", + nullable: false, + comment: "检查申请单打印次数", + oldClrType: typeof(short), + oldType: "smallint"); + + migrationBuilder.AlterColumn( + name: "check_request_no", + table: "register_check", + type: "uuid", + maxLength: 20, + nullable: false, + comment: "检查单号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldMaxLength: 20); + + migrationBuilder.AlterColumn( + name: "check_doctor_id", + table: "register_check", + type: "uuid", + nullable: false, + comment: "检查医生ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "check_date", + table: "register_check", + type: "date", + nullable: true, + comment: "检查日期", + oldClrType: typeof(DateOnly), + oldType: "date", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "auditor_user_id", + table: "register_check", + type: "uuid", + nullable: true, + comment: "审核医生ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "audit_time", + table: "register_check", + type: "timestamp without time zone", + nullable: true, + comment: "审核时间", + oldClrType: typeof(DateTime), + oldType: "timestamp without time zone", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "register_asbitem_id", + table: "register_asbitem", + type: "uuid", + nullable: true, + comment: "主键", + oldClrType: typeof(Guid), + oldType: "uuid", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "lis_request_id", + table: "register_asbitem", + type: "uuid", + maxLength: 20, + nullable: false, + comment: "LIS申请ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldMaxLength: 20); + + migrationBuilder.AlterColumn( + name: "amount", + table: "register_asbitem", + type: "smallint", + nullable: true, + comment: "数量", + oldClrType: typeof(short), + oldType: "smallint", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "register_check_id", + table: "register_asbitem", + type: "uuid", + nullable: false, + comment: "检查单ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "reference_range_value", + table: "reference_range", + type: "character varying(150)", + maxLength: 150, + nullable: true, + comment: "参考范围值数字型保存区间字符型保存文本值", + oldClrType: typeof(string), + oldType: "character varying(150)", + oldMaxLength: 150, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "reference_range_type_flag", + table: "reference_range", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "参考范围类别0-无参考范围,1-数字型,2-字符型,3-性激素", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "critical_range_value", + table: "reference_range", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "危急值", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "room_id", + table: "queue_register", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "房间ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "patient_register_id", + table: "queue_register", + type: "uuid", + nullable: false, + comment: "病人登记ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "no_complete_reason", + table: "queue_register", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "0", + comment: "未完成原因", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "0"); + + migrationBuilder.AlterColumn( + name: "display_order", + table: "queue_register", + type: "integer", + nullable: false, + comment: "排队顺序", + oldClrType: typeof(int), + oldType: "integer"); + + migrationBuilder.AlterColumn( + name: "complete_flag", + table: "queue_register", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "0", + comment: "完成标志", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "0"); + + migrationBuilder.AlterColumn( + name: "call_time", + table: "queue_register", + type: "timestamp without time zone", + nullable: true, + comment: "叫号时间", + oldClrType: typeof(DateTime), + oldType: "timestamp without time zone", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "price_item_code", + table: "price_item", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "价表编码", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "price", + table: "price_item", + type: "numeric(10,2)", + precision: 10, + scale: 2, + nullable: false, + comment: "价格", + oldClrType: typeof(decimal), + oldType: "numeric(10,2)", + oldPrecision: 10, + oldScale: 2); + + migrationBuilder.AlterColumn( + name: "invoice_item_type_id", + table: "price_item", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "发票项目类别ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "price_item", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "reply_content", + table: "phone_follow", + type: "character varying(200)", + maxLength: 200, + nullable: true, + comment: "回复内容", + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "patient_register_id", + table: "phone_follow", + type: "uuid", + nullable: false, + comment: "病人登记ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "follow_up_plan_id", + table: "phone_follow", + type: "uuid", + nullable: true, + comment: "随访计划ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "follow_content", + table: "phone_follow", + type: "character varying(200)", + maxLength: 200, + nullable: true, + comment: "随访内容", + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "id", + table: "pay_mode", + type: "character(4)", + fixedLength: true, + maxLength: 4, + nullable: false, + comment: "编号,固定编码", + oldClrType: typeof(string), + oldType: "character(4)", + oldFixedLength: true, + oldMaxLength: 4); + + migrationBuilder.AlterColumn( + name: "telephone", + table: "patient", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "电话", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "sex_id", + table: "patient", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "性别", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "postal_code", + table: "patient", + type: "character varying(10)", + maxLength: 10, + nullable: true, + comment: "邮政编码", + oldClrType: typeof(string), + oldType: "character varying(10)", + oldMaxLength: 10, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "patient_password", + table: "patient", + type: "character varying(10)", + maxLength: 10, + nullable: true, + comment: "登录密码", + oldClrType: typeof(string), + oldType: "character varying(10)", + oldMaxLength: 10, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "nation_id", + table: "patient", + type: "uuid", + fixedLength: true, + nullable: true, + comment: "民族编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "mobile_telephone", + table: "patient", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "手机号", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "marital_status_id", + table: "patient", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "婚姻状况", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "id_no", + table: "patient", + type: "character varying(18)", + maxLength: 18, + nullable: true, + comment: "身份证号", + oldClrType: typeof(string), + oldType: "character varying(18)", + oldMaxLength: 18, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "email", + table: "patient", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "email", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "patient", + type: "character varying(30)", + maxLength: 30, + nullable: true, + comment: "姓名", + oldClrType: typeof(string), + oldType: "character varying(30)", + oldMaxLength: 30, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "birth_place_id", + table: "patient", + type: "uuid", + fixedLength: true, + nullable: true, + comment: "出生地", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "birth_date", + table: "patient", + type: "date", + nullable: true, + comment: "出生日期", + oldClrType: typeof(DateOnly), + oldType: "date", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "address", + table: "patient", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "地址", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "organization_unit_id", + table: "organization_units_customer_org", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "体检中心编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "customer_org_id", + table: "organization_units_customer_org", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "客户单位编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "medical_report_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "asbitem_id", + table: "medical_package_detail", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "组合项目编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "sign_in_time", + table: "lis_request", + type: "date", + nullable: true, + comment: "签收时间", + oldClrType: typeof(DateOnly), + oldType: "date", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "sign_in_person", + table: "lis_request", + type: "character varying(16)", + maxLength: 16, + nullable: true, + comment: "签收人姓名", + oldClrType: typeof(string), + oldType: "character varying(16)", + oldMaxLength: 16, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "sign_in_order", + table: "lis_request", + type: "integer", + nullable: true, + comment: "签收顺序", + oldClrType: typeof(int), + oldType: "integer", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "sampling_time", + table: "lis_request", + type: "date", + nullable: true, + comment: "采样时间", + oldClrType: typeof(DateOnly), + oldType: "date", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "sampler", + table: "lis_request", + type: "character varying(16)", + maxLength: 16, + nullable: true, + comment: "采样人姓名", + oldClrType: typeof(string), + oldType: "character varying(16)", + oldMaxLength: 16, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "sample_type_id", + table: "lis_request", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "标本类型", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "sample_container_id", + table: "lis_request", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "标本容器编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "patient_register_id", + table: "lis_request", + type: "uuid", + nullable: false, + comment: "病人登记ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "lis_request_no", + table: "lis_request", + type: "uuid", + nullable: false, + comment: "检验申请单号", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "is_sign_in", + table: "lis_request", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是签收", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_print", + table: "lis_request", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是否已打印", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "simple_code", + table: "item_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "自定义简码", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "path_code", + table: "item_type", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "路径编码", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "parent_id", + table: "item_type", + type: "uuid", + fixedLength: true, + nullable: true, + comment: "父id", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "medical_report_type_id", + table: "item_type", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "体检报告类别", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "is_merge_asbitem", + table: "item_type", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "合并组合项目,Y-是,N-否", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "guid_type_id", + table: "item_type", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "指引类别", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "item_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "check_type_flag", + table: "item_type", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "'G'::bpchar", + comment: "检查类别,0-普通检查,1-检验,2-影像检查", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "'G'::bpchar"); + + migrationBuilder.AlterColumn( + name: "item_id", + table: "item_template_detail", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "项目编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "item_default_result", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "unit_id", + table: "item", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "单位", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "result_template_type_flag", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "0", + comment: "结果模板类别标志", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "0"); + + migrationBuilder.AlterColumn( + name: "reference_range_type_flag", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "'E'::bpchar", + comment: "参考范围类别0-无参考范围,1-数字型,2-字符型,3-性激素", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "'E'::bpchar"); + + migrationBuilder.AlterColumn( + name: "price_item_id", + table: "item", + type: "uuid", + fixedLength: true, + maxLength: 8, + nullable: false, + comment: "价表项目编码", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldMaxLength: 8); + + migrationBuilder.AlterColumn( + name: "price", + table: "item", + type: "numeric(10,2)", + precision: 10, + scale: 2, + nullable: false, + comment: "价格", + oldClrType: typeof(decimal), + oldType: "numeric(10,2)", + oldPrecision: 10, + oldScale: 2); + + migrationBuilder.AlterColumn( + name: "item_type_id", + table: "item", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "项目类别", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "is_produce_summary", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是生成小结", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_name_into_summary", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "名称进入小结", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_diagnosis_function", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "启用诊断函数", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_continue_process", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是继续处理", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_calculation_item", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是计算项目", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_active", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "启用", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "input_check", + table: "item", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "输入结果校验公式", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "english_short_name", + table: "item", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "英文缩写", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "item", + type: "character varying(30)", + maxLength: 30, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(30)", + oldMaxLength: 30, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "diagnosis_function", + table: "item", + type: "character varying(2000)", + maxLength: 2000, + nullable: true, + comment: "诊断函数", + oldClrType: typeof(string), + oldType: "character varying(2000)", + oldMaxLength: 2000, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "default_result", + table: "item", + type: "character varying(200)", + maxLength: 200, + nullable: true, + comment: "默认结果", + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "calculation_function", + table: "item", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "计算函数", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "invoice_org", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "invoice_item_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "patient_register_no", + table: "import_pacs_result", + type: "character varying(12)", + maxLength: 12, + nullable: true, + comment: "人员登记号", + oldClrType: typeof(string), + oldType: "character varying(12)", + oldMaxLength: 12, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "is_print", + table: "import_pacs_picture", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是否打印", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "检查所见"); + + migrationBuilder.AlterColumn( + name: "check_request_no", + table: "import_pacs_picture", + type: "uuid", + nullable: false, + comment: "检查申请单号", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "guide_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "follow_up_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "remark", + table: "follow_up_plan", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "备注", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "perfom_user_id", + table: "follow_up_plan", + type: "uuid", + nullable: false, + comment: "执行者用户ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "perfom_time", + table: "follow_up_plan", + type: "timestamp without time zone", + nullable: true, + comment: "执行时间", + oldClrType: typeof(DateTime), + oldType: "timestamp without time zone", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "perfom_flag", + table: "follow_up_plan", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "执行标志", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_loop", + table: "follow_up_plan", + type: "character(1)", + maxLength: 1, + nullable: true, + comment: "是否循环", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "follow_up_type_id", + table: "follow_up_plan", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "随访类别", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "follow_up_mode_id", + table: "follow_up_plan", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "随访方式", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "doctor_user_id", + table: "follow_up_plan", + type: "uuid", + nullable: false, + comment: "医生", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "cycle_days", + table: "follow_up_plan", + type: "smallint", + nullable: false, + comment: "周期天数", + oldClrType: typeof(short), + oldType: "smallint"); + + migrationBuilder.AlterColumn( + name: "content", + table: "follow_up_plan", + type: "character varying(200)", + maxLength: 200, + nullable: true, + comment: "随访内容", + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "follow_up_mode", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "path_code", + table: "diagnosis_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "路径编码", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "parent_id", + table: "diagnosis_type", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "父编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "diagnosis_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "diagnosis_id", + table: "diagnosis_template_detail", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "诊断编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "diagnosis_template_id", + table: "diagnosis_template_detail", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "诊断模板编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "diagnosis_template", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "diagnosis_postfix", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "suggestion_name", + table: "diagnosis", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "建议名称", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "item_type_id", + table: "diagnosis", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "项目类别", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "is_summary_template", + table: "diagnosis", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是总检模板", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_ill", + table: "diagnosis", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是疾病", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "for_sex_id", + table: "diagnosis", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "'A'::bpchar", + comment: "适用性别", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "'A'::bpchar"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "diagnosis", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "diagnosis_level_id", + table: "diagnosis", + type: "uuid", + nullable: false, + comment: "诊断级别", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "customer_org_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "register_no", + table: "customer_org_register", + type: "character varying(12)", + maxLength: 12, + nullable: true, + comment: "计划号", + oldClrType: typeof(string), + oldType: "character varying(12)", + oldMaxLength: 12, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "register_name", + table: "customer_org_register", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "计划名称", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "price", + table: "customer_org_group_detail", + type: "numeric(10,2)", + precision: 10, + scale: 2, + nullable: false, + comment: "价格", + oldClrType: typeof(decimal), + oldType: "numeric(10,2)", + oldPrecision: 10, + oldScale: 2); + + migrationBuilder.AlterColumn( + name: "asbitem_id", + table: "customer_org_group_detail", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "组合项目编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "customer_org_group_id", + table: "customer_org_group_detail", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "分组编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "pay_mode_id", + table: "customer_org_charge_pay", + type: "character(4)", + fixedLength: true, + maxLength: 4, + nullable: true, + comment: "支付方式", + oldClrType: typeof(string), + oldType: "character(4)", + oldFixedLength: true, + oldMaxLength: 4, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "charge_money", + table: "customer_org_charge_pay", + type: "numeric(10,2)", + precision: 10, + scale: 2, + nullable: false, + comment: "支付金额", + oldClrType: typeof(decimal), + oldType: "numeric(10,2)", + oldPrecision: 10, + oldScale: 2); + + migrationBuilder.AlterColumn( + name: "back_moeny", + table: "customer_org_charge_back_pay", + type: "numeric(10,2)", + precision: 10, + scale: 2, + nullable: false, + comment: "退费金额", + oldClrType: typeof(decimal), + oldType: "numeric(10,2)", + oldPrecision: 10, + oldScale: 2); + + migrationBuilder.AlterColumn( + name: "pay_mode_id", + table: "customer_org_charge_back_pay", + type: "character(4)", + fixedLength: true, + maxLength: 4, + nullable: false, + comment: "支付方式", + oldClrType: typeof(string), + oldType: "character(4)", + oldFixedLength: true, + oldMaxLength: 4); + + migrationBuilder.AlterColumn( + name: "settle_account_id", + table: "customer_org_charge_back", + type: "uuid", + nullable: true, + comment: "结算账户ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "customer_org_charge_id", + table: "customer_org_charge_back", + type: "uuid", + nullable: false, + comment: "收费编号", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "settle_account_id", + table: "customer_org_charge", + type: "uuid", + nullable: false, + comment: "结算账户ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "payer", + table: "customer_org_charge", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "付款人", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "customer_org_register_id", + table: "customer_org_charge", + type: "uuid", + nullable: false, + comment: "客户单位登记ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "charge_flag", + table: "customer_org_charge", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "收退费标志", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "status_flag", + table: "customer_org", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "0", + comment: "状态", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "0"); + + migrationBuilder.AlterColumn( + name: "short_name", + table: "customer_org", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "简称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "path_code", + table: "customer_org", + type: "character varying(60)", + maxLength: 60, + nullable: true, + comment: "路径编码", + oldClrType: typeof(string), + oldType: "character varying(60)", + oldMaxLength: 60, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "parent_id", + table: "customer_org", + type: "uuid", + fixedLength: true, + nullable: true, + comment: "父编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "is_lock", + table: "customer_org", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "锁住", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "invoice_name", + table: "customer_org", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "开票名称", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "path_code", + table: "critical_value_type", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "路径编码", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "parent_id", + table: "critical_value_type", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "父编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "critical_value_type", + type: "character varying(40)", + maxLength: 40, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(40)", + oldMaxLength: 40, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "critical_value", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "critical_value_type_id", + table: "critical_value", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "危急值类别编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "title", + table: "contact_person", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "职务", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "remark", + table: "contact_person", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "备注", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "contact_person", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "姓名", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "customer_org_id", + table: "contact_person", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "客户单位编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "contact_method_value", + table: "contact_method", + type: "character varying(15)", + maxLength: 15, + nullable: true, + comment: "联系方式,比如18911254911,839860190@qq.com", + oldClrType: typeof(string), + oldType: "character varying(15)", + oldMaxLength: 15, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "contact_method_type", + table: "contact_method", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "'M'::bpchar", + comment: "联系方式类别-比如0-手机、1-电子邮箱", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "'M'::bpchar"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "common_char_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "common_char", + type: "character varying(1)", + maxLength: 1, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(1)", + oldMaxLength: 1, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "common_char_type_id", + table: "common_char", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "常用字符类别编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "back_moeny", + table: "charge_back_pay", + type: "numeric(10,2)", + precision: 10, + scale: 2, + nullable: false, + comment: "退费金额", + oldClrType: typeof(decimal), + oldType: "numeric(10,2)", + oldPrecision: 10, + oldScale: 2); + + migrationBuilder.AlterColumn( + name: "pay_mode_id", + table: "charge_back_pay", + type: "character(4)", + fixedLength: true, + maxLength: 4, + nullable: false, + comment: "支付方式ID", + oldClrType: typeof(string), + oldType: "character(4)", + oldFixedLength: true, + oldMaxLength: 4); + + migrationBuilder.AlterColumn( + name: "settle_account_id", + table: "charge_back", + type: "uuid", + nullable: false, + comment: "结账ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "settle_account_id", + table: "charge", + type: "uuid", + nullable: false, + comment: "结账ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "country_code", + table: "birth_place", + type: "character varying(6)", + maxLength: 6, + nullable: true, + comment: "国家标准码", + oldClrType: typeof(string), + oldType: "character varying(6)", + oldMaxLength: 6, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "path_code", + table: "bigtext_result_type", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "路径编码", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "parent_id", + table: "bigtext_result_type", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "父编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "item_type_id", + table: "bigtext_result_type", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "项目类别", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "bigtext_result_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "bigtext_result_template", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "bigtext_result_type_id", + table: "bigtext_result_template", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "结果类别编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "description", + table: "bigtext_result_description", + type: "character varying(200)", + maxLength: 200, + nullable: true, + comment: "描述", + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "conclusion", + table: "bigtext_result_conclusion", + type: "character varying(200)", + maxLength: 200, + nullable: true, + comment: "结论", + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "price_item_id", + table: "asbitem_price_item", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "价表项目编码", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "asbitem_id", + table: "asbitem_price_item", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "组合项目编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "amount", + table: "asbitem_price_item", + type: "smallint", + nullable: true, + comment: "数量", + oldClrType: typeof(short), + oldType: "smallint", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "guide", + table: "asbitem_guide", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "指引单内容", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "for_sex_id", + table: "asbitem_guide", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "适用性别ID", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "asbitem_id", + table: "asbitem_guide", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "组合项目ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "organization_unit_id", + table: "asbitem_guide", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "单位科室ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "item_id", + table: "asbitem_detail", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "项目编码", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "short_name", + table: "asbitem", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "简称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "queue_time", + table: "asbitem", + type: "numeric(3,1)", + precision: 3, + scale: 1, + nullable: false, + comment: "候诊时间", + oldClrType: typeof(decimal), + oldType: "numeric(3,1)", + oldPrecision: 3, + oldScale: 1); + + migrationBuilder.AlterColumn( + name: "price", + table: "asbitem", + type: "numeric(8,2)", + precision: 8, + scale: 2, + nullable: false, + comment: "价格", + oldClrType: typeof(decimal), + oldType: "numeric(8,2)", + oldPrecision: 8, + oldScale: 2); + + migrationBuilder.AlterColumn( + name: "item_type_id", + table: "asbitem", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "项目类别", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "is_picture_rotate", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "体检报告图片旋转90°", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_item_result_merger", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "项目结果合并", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_diagnosis_function", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "启用诊断函数", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_continue_process", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "诊断函数处理完毕后继续处理", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_check", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是检查项目", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_before_eat", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "餐前项目", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_active", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是启用", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "invoice_item_type_id", + table: "asbitem", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "发票类别", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "for_sex_id", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "'A'::bpchar", + comment: "适用性别,M-男,F-女,A-全部", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "'A'::bpchar"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "asbitem", + type: "character varying(30)", + maxLength: 30, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(30)", + oldMaxLength: 30, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "diagnosis_function", + table: "asbitem", + type: "character varying(1000)", + maxLength: 1000, + nullable: true, + comment: "诊断函数", + oldClrType: typeof(string), + oldType: "character varying(1000)", + oldMaxLength: 1000, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "device_type_id", + table: "asbitem", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "仪器类别", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "default_result", + table: "asbitem", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "默认结果", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "clinical_meaning", + table: "asbitem", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "临床意义", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + } + } +} diff --git a/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230625012410_i062502.Designer.cs b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230625012410_i062502.Designer.cs new file mode 100644 index 00000000..f6f90c9d --- /dev/null +++ b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230625012410_i062502.Designer.cs @@ -0,0 +1,10689 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; +using Shentun.Peis.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Shentun.Peis.Migrations +{ + [DbContext(typeof(PeisDbContext))] + [Migration("20230625012410_i062502")] + partial class i062502 + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.PostgreSql) + .HasAnnotation("ProductVersion", "6.0.5") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("AsbitemRoom", b => + { + b.Property("AsbitemId") + .HasColumnType("uuid"); + + b.Property("RoomId") + .HasColumnType("uuid"); + + b.HasKey("AsbitemId", "RoomId"); + + b.ToTable("AsbitemRoom"); + }); + + modelBuilder.Entity("ChildDiagnosis", b => + { + b.Property("ParentDiagnosisId") + .HasMaxLength(8) + .HasColumnType("uuid") + .HasColumnName("parent_diagnosis_id") + .IsFixedLength(); + + b.Property("DiagnosisId") + .HasMaxLength(8) + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength(); + + b.HasKey("ParentDiagnosisId", "DiagnosisId") + .HasName("pk_child_diagnosis"); + + b.HasIndex("DiagnosisId"); + + b.ToTable("child_diagnosis", (string)null); + + b.HasComment("子诊断"); + }); + + modelBuilder.Entity("DiagnosisDiagnosis", b => + { + b.Property("DiagnosisId") + .HasColumnType("uuid"); + + b.Property("ParentDiagnosisId") + .HasColumnType("uuid"); + + b.HasKey("DiagnosisId", "ParentDiagnosisId"); + + b.ToTable("DiagnosisDiagnosis"); + }); + + modelBuilder.Entity("RoomAsbitem", b => + { + b.Property("RoomId") + .HasMaxLength(5) + .HasColumnType("uuid") + .HasColumnName("room_id") + .IsFixedLength(); + + b.Property("AsbitemId") + .HasMaxLength(6) + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength(); + + b.HasKey("RoomId", "AsbitemId") + .HasName("pk_room_asbitem"); + + b.HasIndex("AsbitemId"); + + b.ToTable("room_asbitem", (string)null); + + b.HasComment("房间包含组合项目设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.HelloA", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ADesc") + .HasColumnType("text") + .HasColumnName("a_desc"); + + b.Property("AName") + .ValueGeneratedOnAdd() + .HasColumnType("text") + .HasDefaultValue("默认值") + .HasColumnName("a_name"); + + b.Property("AddTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("add_time") + .HasDefaultValueSql("now()"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("HelloTypeId") + .HasColumnType("uuid") + .HasColumnName("hello_type_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("HelloTypeId"); + + b.ToTable("hello_a"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.HelloType", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("TypeName") + .HasColumnType("text") + .HasColumnName("type_name") + .HasComment("类型名称"); + + b.HasKey("Id"); + + b.ToTable("hello_type"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.Student", b => + { + b.Property("Sid") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("sid"); + + b.Property("Cid") + .HasColumnType("text"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasColumnType("text"); + + b.Property("Uid") + .HasColumnType("uuid"); + + b.HasKey("Sid"); + + b.ToTable("student"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.TestA", b => + { + b.Property("AId") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("AName") + .HasColumnType("text"); + + b.HasKey("AId"); + + b.ToTable("testa"); + + b.HasComment("组合项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.TestB", b => + { + b.Property("BId") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("AId") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("AName") + .HasColumnType("text"); + + b.Property("TestAsAId") + .HasColumnType("uuid"); + + b.HasKey("BId"); + + b.HasIndex("TestAsAId"); + + b.ToTable("testb"); + + b.HasComment("组合项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Asbitem", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("ClinicalMeaning") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("clinical_meaning"); + + b.Property("CreationTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DefaultResult") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("default_result"); + + b.Property("DeviceTypeId") + .HasColumnType("uuid") + .HasColumnName("device_type_id") + .IsFixedLength(); + + b.Property("DiagnosisFunction") + .HasMaxLength(1000) + .HasColumnType("character varying(1000)") + .HasColumnName("diagnosis_function"); + + b.Property("DisplayName") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar"); + + b.Property("InvoiceItemTypeId") + .HasColumnType("uuid") + .HasColumnName("invoice_item_type_id") + .IsFixedLength(); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active"); + + b.Property("IsBeforeEat") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_before_eat"); + + b.Property("IsCheck") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_check"); + + b.Property("IsContinueProcess") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_continue_process"); + + b.Property("IsDiagnosisFunction") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_diagnosis_function"); + + b.Property("IsItemResultMerger") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_item_result_merger"); + + b.Property("IsPictureRotate") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_picture_rotate"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Price") + .HasPrecision(8, 2) + .HasColumnType("numeric(8,2)") + .HasColumnName("price"); + + b.Property("QueueTime") + .HasPrecision(3, 1) + .HasColumnType("numeric(3,1)") + .HasColumnName("queue_time"); + + b.Property("ShortName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("short_name"); + + b.Property("SimpleCode") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("InvoiceItemTypeId"); + + b.HasIndex("ItemTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_asbitem") + .IsUnique(); + + b.ToTable("asbitem"); + + b.HasComment("组合项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.AsbitemDetail", b => + { + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength(); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength(); + + b.HasKey("AsbitemId", "ItemId") + .HasName("pk_department_asbitem_detail"); + + b.HasIndex("ItemId"); + + b.ToTable("asbitem_detail"); + + b.HasComment("组合项目包含项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.AsbitemGuide", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id") + .IsFixedLength(); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength(); + + b.Property("ForSexId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id"); + + b.Property("Guide") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("guide"); + + b.HasKey("OrganizationUnitId", "AsbitemId", "ForSexId") + .HasName("pk_department_asbitem_guide"); + + b.ToTable("asbitem_guide"); + + b.HasComment("体检中心组和项目指引内容"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.AsbitemPriceItem", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("Amount") + .HasColumnType("smallint") + .HasColumnName("amount"); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PriceItemId") + .HasColumnType("uuid") + .HasColumnName("price_item_id") + .IsFixedLength(); + + b.HasKey("Id"); + + b.ToTable("asbitem_price_item"); + + b.HasComment("组和项目包含价表项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultConclusion", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("BigtextResultTemplateId") + .HasColumnType("uuid") + .HasColumnName("bigtext_result_template_id") + .IsFixedLength(); + + b.Property("Conclusion") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("conclusion"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("BigtextResultTemplateId"); + + b.ToTable("bigtext_result_conclusion"); + + b.HasComment("大文本结果结论"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultDescription", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("BigtextResultTemplateId") + .HasColumnType("uuid") + .HasColumnName("bigtext_result_template_id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("description"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("BigtextResultTemplateId"); + + b.ToTable("bigtext_result_description"); + + b.HasComment("大文本结果描述"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("BigtextResultTypeId") + .HasColumnType("uuid") + .HasColumnName("bigtext_result_type_id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("BigtextResultTypeId"); + + b.ToTable("bigtext_result_template"); + + b.HasComment("大文本结果模板"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength(); + + b.Property("PathCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("path_code"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("ItemTypeId"); + + b.ToTable("bigtext_result_type"); + + b.HasComment("大文本结果类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BirthPlace", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CountryCode") + .HasMaxLength(6) + .HasColumnType("character varying(6)") + .HasColumnName("country_code"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_birth_place") + .IsUnique(); + + b.ToTable("birth_place"); + + b.HasComment("出生地"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardBill", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("编号"); + + b.Property("BillFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("bill_flag") + .HasDefaultValueSql("'0'::bpchar") + .HasComment("记账标志"); + + b.Property("BillMoney") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("bill_money") + .HasComment("记账金额"); + + b.Property("CardRegisterId") + .HasColumnType("uuid") + .HasColumnName("card_register_id") + .HasComment("卡登记编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PayModeId") + .ValueGeneratedOnAdd() + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("pay_mode_id") + .HasDefaultValueSql("'1'::bpchar") + .IsFixedLength() + .HasComment("支付方式"); + + b.HasKey("Id"); + + b.HasIndex("CardRegisterId"); + + b.HasIndex("PayModeId"); + + b.ToTable("card_bill"); + + b.HasComment("卡记账记录"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardRegister", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("编号"); + + b.Property("CardFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("card_flag") + .HasDefaultValueSql("0") + .HasComment("使用标志"); + + b.Property("CardNo") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("card_no") + .HasComment("卡号"); + + b.Property("CardPassword") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("card_password"); + + b.Property("CardTypeId") + .HasColumnType("uuid") + .HasColumnName("card_type_id") + .IsFixedLength() + .HasComment("卡类型"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("customer_name") + .HasComment("领用者"); + + b.Property("Discount") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("discount") + .HasDefaultValueSql("100") + .HasComment("折扣"); + + b.Property("ExpiryDate") + .HasColumnType("date") + .HasColumnName("expiry_date") + .HasComment("有效期"); + + b.Property("IdNo") + .HasMaxLength(18) + .HasColumnType("character varying(18)") + .HasColumnName("id_no") + .HasComment("身份证号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MobileTelephone") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("mobile_telephone") + .HasComment("手机"); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id") + .IsFixedLength(); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("Telephone") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("telephone") + .HasComment("电话"); + + b.HasKey("Id"); + + b.HasIndex("CardTypeId"); + + b.HasIndex("OrganizationUnitId"); + + b.HasIndex(new[] { "CardNo", "CardFlag" }, "ix_card_register") + .IsUnique(); + + b.ToTable("card_register"); + + b.HasComment("会员卡登记"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("CardModeId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("card_mode_id") + .HasDefaultValueSql("0") + .HasComment("卡模式"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("Discount") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("discount") + .HasDefaultValueSql("100") + .HasComment("折扣"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("ExpiryDay") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("expiry_day") + .HasDefaultValueSql("3650") + .HasComment("有效期"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark") + .HasComment("备注"); + + b.HasKey("Id"); + + b.ToTable("card_type"); + + b.HasComment("会员卡类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Charge", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("收据号"); + + b.Property("ChargeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("charge_flag") + .HasDefaultValueSql("0"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("InvoiceNo") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("invoice_no"); + + b.Property("InvoiceOrgName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("invoice_org_name"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("登记流水号"); + + b.Property("SettleAccountId") + .HasColumnType("uuid") + .HasColumnName("settle_account_id"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "PatientRegisterId" }, "fki_fk_patient_register_charge"); + + b.HasIndex(new[] { "PatientRegisterId" }, "ix_charge"); + + b.ToTable("charge"); + + b.HasComment("收费主档"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeAsbitem", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Amount") + .HasColumnType("smallint") + .HasColumnName("amount"); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength() + .HasComment("组合项目"); + + b.Property("ChargeId") + .HasColumnType("uuid") + .HasColumnName("charge_id") + .HasComment("收据号"); + + b.Property("ChargePrice") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_price") + .HasComment("价格"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("RegisterAsbitemId") + .HasColumnType("uuid") + .HasColumnName("register_asbitem_id"); + + b.HasKey("Id"); + + b.HasIndex("AsbitemId"); + + b.HasIndex("ChargeId"); + + b.ToTable("charge_asbitem"); + + b.HasComment("收费包含组合项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeBack", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("退费编号"); + + b.Property("ChargeId") + .HasColumnType("uuid") + .HasColumnName("charge_id") + .HasComment("收据号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SettleAccountId") + .HasColumnType("uuid") + .HasColumnName("settle_account_id"); + + b.HasKey("Id"); + + b.HasIndex("ChargeId"); + + b.ToTable("charge_back"); + + b.HasComment("退费主档"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeBackPay", b => + { + b.Property("ChargeBackId") + .HasColumnType("uuid") + .HasColumnName("charge_back_id"); + + b.Property("PayModeId") + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("pay_mode_id") + .IsFixedLength(); + + b.Property("BackMoeny") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("back_moeny"); + + b.HasKey("ChargeBackId", "PayModeId") + .HasName("pk_department_charge_back_pay"); + + b.HasIndex("PayModeId"); + + b.ToTable("charge_back_pay"); + + b.HasComment("退费支付方式"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargePay", b => + { + b.Property("ChargeId") + .HasColumnType("uuid") + .HasColumnName("charge_id") + .HasComment("收据号"); + + b.Property("PayModeId") + .ValueGeneratedOnAdd() + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("pay_mode_id") + .HasDefaultValueSql("'1'::bpchar") + .IsFixedLength() + .HasComment("支付方式"); + + b.Property("CardBillId") + .HasColumnType("uuid") + .HasColumnName("card_bill_id"); + + b.Property("ChargeMoney") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_money") + .HasComment("金额"); + + b.HasKey("ChargeId", "PayModeId") + .HasName("pk_department_charge_pay"); + + b.HasIndex("PayModeId"); + + b.ToTable("charge_pay"); + + b.HasComment("收费支付方式"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargePriceItem", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Amount") + .HasColumnType("smallint") + .HasColumnName("amount"); + + b.Property("ChargeAsbitemId") + .HasColumnType("uuid") + .HasColumnName("charge_asbitem_id"); + + b.Property("ChargePrice") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_price"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PriceItemId") + .HasColumnType("uuid") + .HasColumnName("price_item_id"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "ChargeAsbitemId" }, "fki_fk_charge_asbitem"); + + b.HasIndex(new[] { "ChargeAsbitemId", "PriceItemId" }, "ix_charge_price_item"); + + b.ToTable("charge_price_item"); + + b.HasComment("收费价表项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CommonChar", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CommonCharTypeId") + .HasColumnType("uuid") + .HasColumnName("common_char_type_id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(1) + .HasColumnType("character varying(1)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(1) + .HasColumnType("character varying(1)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("CommonCharTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_common_char") + .IsUnique(); + + b.ToTable("common_char"); + + b.HasComment("常用字符"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CommonCharType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_common_char_type") + .IsUnique(); + + b.ToTable("common_char_type"); + + b.HasComment("常用字符类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ContactMethod", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ContactMethodType") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("contact_method_type") + .HasDefaultValueSql("'M'::bpchar"); + + b.Property("ContactMethodValue") + .HasMaxLength(15) + .HasColumnType("character varying(15)") + .HasColumnName("contact_method_value"); + + b.Property("ContactPersonId") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("ContactPersonId"); + + b.ToTable("contact_method"); + + b.HasComment("联系方式"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ContactPerson", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgId") + .HasColumnType("uuid") + .HasColumnName("customer_org_id") + .IsFixedLength(); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("Title") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("title"); + + b.HasKey("Id"); + + b.HasIndex("CustomerOrgId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_contact"); + + b.HasIndex(new[] { "SimpleCode" }, "ix_contact_simple_code"); + + b.ToTable("contact_person"); + + b.HasComment("联系人"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CriticalValue", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CriticalValueTypeId") + .HasColumnType("uuid") + .HasColumnName("critical_value_type_id") + .IsFixedLength(); + + b.Property("DisplayName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("CriticalValueTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_critical_value") + .IsUnique(); + + b.ToTable("critical_value"); + + b.HasComment("危急值关键字设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CriticalValueType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength(); + + b.Property("PathCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("path_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_critical_value_type") + .IsUnique(); + + b.ToTable("critical_value_type"); + + b.HasComment("危急值类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrg", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("单位ID"); + + b.Property("Accounts") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("accounts") + .HasComment("银行帐号"); + + b.Property("Address") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("address") + .HasComment("联系地址"); + + b.Property("Bank") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("bank") + .HasComment("业务银行"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("单位名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("Fax") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("fax") + .HasComment("传真"); + + b.Property("InvoiceName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("invoice_name"); + + b.Property("IsLock") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_lock"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OrgTypeId") + .HasColumnType("uuid") + .HasColumnName("org_type_id") + .IsFixedLength() + .HasComment("单位性质"); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength(); + + b.Property("PathCode") + .HasMaxLength(60) + .HasColumnType("character varying(60)") + .HasColumnName("path_code"); + + b.Property("PostalCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("postal_code") + .HasComment("邮政编码"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("ShortName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("short_name"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code") + .HasComment("拼音简码"); + + b.Property("StatusFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("status_flag") + .HasDefaultValueSql("0"); + + b.Property("Telephone") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("telephone") + .HasComment("联系电话"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "OrganizationUnitId" }, "fki_fk_customer_org_organization_units"); + + b.HasIndex(new[] { "ParentId", "DisplayName" }, "ix_org") + .IsUnique(); + + b.ToTable("customer_org"); + + b.HasComment("团检单位设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgCharge", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ChargeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("charge_flag"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgRegisterId") + .HasColumnType("uuid") + .HasColumnName("customer_org_register_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Payer") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("payer"); + + b.Property("SettleAccountId") + .HasColumnType("uuid") + .HasColumnName("settle_account_id"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "CustomerOrgRegisterId" }, "fki_fk_customer_org_charge_register"); + + b.ToTable("customer_org_charge"); + + b.HasComment("团检单位收费"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargeBack", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgChargeId") + .HasColumnType("uuid") + .HasColumnName("customer_org_charge_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SettleAccountId") + .HasColumnType("uuid") + .HasColumnName("settle_account_id"); + + b.HasKey("Id"); + + b.HasIndex("CustomerOrgChargeId"); + + b.ToTable("customer_org_charge_back"); + + b.HasComment("团检单位退费"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargeBackPay", b => + { + b.Property("CustomerOrgChargeBackId") + .HasColumnType("uuid") + .HasColumnName("customer_org_charge_back_id"); + + b.Property("PayModeId") + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("pay_mode_id") + .IsFixedLength(); + + b.Property("BackMoeny") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("back_moeny"); + + b.HasKey("CustomerOrgChargeBackId", "PayModeId") + .HasName("pk_org_charge_back_pay"); + + b.HasIndex("PayModeId"); + + b.ToTable("customer_org_charge_back_pay"); + + b.HasComment("团结退费支付方式"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargePay", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ChargeMoney") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_money"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PayModeId") + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("pay_mode_id") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("PayModeId"); + + b.ToTable("customer_org_charge_pay"); + + b.HasComment("团检收费支付方式"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgGroup", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("分组编号"); + + b.Property("AgeLowerLimit") + .HasColumnType("smallint") + .HasColumnName("age_lower_limit") + .HasComment("适用年龄下限"); + + b.Property("AgeUpperLimit") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasColumnName("age_upper_limit") + .HasDefaultValueSql("120") + .HasComment("适用年龄上限"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgRegisterId") + .HasColumnType("uuid") + .HasColumnName("customer_org_register_id"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("分组名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar") + .HasComment("适用性别"); + + b.Property("JobPost") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("job_post") + .HasComment("适用职务"); + + b.Property("JobTitle") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("job_title") + .HasComment("适用职称"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MaritalStatusId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("marital_status_id") + .HasComment("适用婚姻状况"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price") + .HasComment("价格"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark") + .HasComment("备注"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "CustomerOrgRegisterId" }, "fki_fk_customer_org_group_register"); + + b.ToTable("customer_org_group"); + + b.HasComment("团体分组主档"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgGroupDetail", b => + { + b.Property("CustomerOrgGroupId") + .HasColumnType("uuid") + .HasColumnName("customer_org_group_id") + .IsFixedLength(); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength(); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price"); + + b.HasKey("CustomerOrgGroupId", "AsbitemId") + .HasName("pk_org_group_detail"); + + b.HasIndex("AsbitemId"); + + b.ToTable("customer_org_group_detail"); + + b.HasComment("团检分组包含组合项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgRegister", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("BeginTime") + .ValueGeneratedOnAdd() + .HasColumnType("date") + .HasColumnName("begin_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)") + .HasComment("开始日期"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgId") + .HasColumnType("uuid") + .HasColumnName("customer_org_id") + .IsFixedLength() + .HasComment("单位编号"); + + b.Property("EndTime") + .HasColumnType("date") + .HasColumnName("end_time") + .HasComment("结束日期"); + + b.Property("IsComplete") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_complete") + .HasComment("完成标志"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MedicalTimes") + .HasColumnType("smallint") + .HasColumnName("medical_times") + .HasComment("单位体检次数"); + + b.Property("RegisterName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("register_name"); + + b.Property("RegisterNo") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("register_no"); + + b.HasKey("Id"); + + b.HasIndex("CustomerOrgId"); + + b.ToTable("customer_org_register"); + + b.HasComment("团检体检登记"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_org_type") + .IsUnique(); + + b.ToTable("customer_org_type"); + + b.HasComment("团体类型设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Department", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CodePrefix") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("code_prefix"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DepartmentTypeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("department_type_flag"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasMaxLength(4) + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength(); + + b.Property("PathCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("path_code"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName", "ParentId" }, "ix_department") + .IsUnique(); + + b.ToTable("department"); + + b.HasComment("部门"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DeviceType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("仪器类别编号"); + + b.Property("CheckTypeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("check_type_flag"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("仪器类别名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.ToTable("device_type"); + + b.HasComment("仪器类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Diagnosis", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DiagnosisLevelId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_level_id"); + + b.Property("DisplayName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar"); + + b.Property("IsIll") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_ill"); + + b.Property("IsSummaryTemplate") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_summary_template"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("simple_code"); + + b.Property("SuggestionName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("suggestion_name"); + + b.HasKey("Id"); + + b.HasIndex("DiagnosisLevelId"); + + b.HasIndex("ItemTypeId"); + + b.ToTable("diagnosis"); + + b.HasComment("诊断设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisLevel", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.ToTable("diagnosis_level"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisPostfix", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_diagnosis_postfix") + .IsUnique(); + + b.ToTable("diagnosis_postfix"); + + b.HasComment("诊断后缀设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_diagnosis_template") + .IsUnique(); + + b.ToTable("diagnosis_template"); + + b.HasComment("诊断模板设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisTemplateDetail", b => + { + b.Property("DiagnosisTemplateId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_template_id") + .IsFixedLength(); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength(); + + b.HasKey("DiagnosisTemplateId", "DiagnosisId") + .HasName("pk_diagnosis_template_detail"); + + b.HasIndex("DiagnosisId"); + + b.ToTable("diagnosis_template_detail"); + + b.HasComment("诊断模板包含明细"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength(); + + b.Property("PathCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("path_code"); + + b.HasKey("Id"); + + b.ToTable("diagnosis_type"); + + b.HasComment("诊断类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.FollowUpMode", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("smallint") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("follow_up_mode"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.FollowUpPlan", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Content") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("content"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CycleDays") + .HasColumnType("smallint") + .HasColumnName("cycle_days"); + + b.Property("DoctorUserId") + .HasColumnType("uuid") + .HasColumnName("doctor_user_id"); + + b.Property("FollowUpModeId") + .HasColumnType("uuid") + .HasColumnName("follow_up_mode_id") + .IsFixedLength(); + + b.Property("FollowUpTypeId") + .HasColumnType("uuid") + .HasColumnName("follow_up_type_id") + .IsFixedLength(); + + b.Property("IsLoop") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_loop"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PerfomFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("perfom_flag"); + + b.Property("PerfomTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("perfom_time"); + + b.Property("PerfomUserId") + .HasColumnType("uuid") + .HasColumnName("perfom_user_id"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark"); + + b.HasKey("Id"); + + b.ToTable("follow_up_plan"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.FollowUpType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("smallint") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("follow_up_type"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ForSex", b => + { + b.Property("Id") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("id"); + + b.Property("DisplayName") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("SimpleCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("for_sex"); + + b.HasComment("可支持性别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Grouping", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ModifiedDate") + .HasColumnType("date") + .HasColumnName("modified_date"); + + b.Property("Modifier") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("modifier"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_grouping") + .IsUnique(); + + b.ToTable("grouping"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.GuideType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("guide_type"); + + b.HasComment("指引类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.HealthCertificate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("登记流水号"); + + b.Property("CertificateDate") + .HasColumnType("date") + .HasColumnName("certificate_date") + .HasComment("发证日期"); + + b.Property("CertificateNo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("certificate_no") + .HasComment("证件编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ServiceOrg") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("service_org") + .HasComment("服务单位"); + + b.Property("ServiceTradesId") + .HasColumnType("smallint") + .HasColumnName("service_trades_id") + .HasComment("服务行业"); + + b.HasKey("Id"); + + b.ToTable("health_certificate"); + + b.HasComment("健康证办理"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ImportLisResult", b => + { + b.Property("LisRequestNo") + .HasColumnType("uuid") + .HasColumnName("lis_request_no") + .HasComment("条码号"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .HasComment("项目"); + + b.Property("CheckDoctorName") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("check_doctor_name") + .HasComment("检查医生"); + + b.Property("CheckTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("check_time") + .HasComment("检查日期"); + + b.Property("CriticalRangeValue") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("critical_range_value"); + + b.Property("ImportTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("import_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)") + .HasComment("导入日期"); + + b.Property("ItemName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("item_name"); + + b.Property("PatientRegisterNo") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("patient_register_no") + .HasComment("条码号"); + + b.Property("ReferenceRangeValue") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("reference_range_value") + .HasComment("参考范围"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("ReportPrompt") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("report_prompt") + .HasComment("报告单提示"); + + b.Property("Result") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("result") + .HasComment("结果"); + + b.Property("Unit") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("unit") + .HasComment("单位"); + + b.HasKey("LisRequestNo", "ItemId") + .HasName("pk_import_lis_result"); + + b.HasIndex(new[] { "PatientRegisterNo" }, "ix_import_lis_result"); + + b.ToTable("import_lis_result"); + + b.HasComment("检验结果中间表"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ImportPacsPicture", b => + { + b.Property("CheckRequestNo") + .HasColumnType("uuid") + .HasColumnName("check_request_no"); + + b.Property("PictureFilename") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("picture_filename") + .HasComment("检查部位"); + + b.Property("AsbitemNames") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("asbitem_names") + .HasComment("组合项目名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("诊断结论"); + + b.Property("ImportTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("import_time") + .HasComment("导入日期"); + + b.Property("IsPrint") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_print") + .HasComment("检查所见"); + + b.Property("PatientRegisterNo") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("patient_register_no"); + + b.HasKey("CheckRequestNo", "PictureFilename") + .HasName("pk_import_pacs_picture_1"); + + b.ToTable("import_pacs_picture"); + + b.HasComment("pacs图片中间表"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ImportPacsResult", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AsbitemNames") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("asbitem_names") + .HasComment("组合项目名称"); + + b.Property("CheckDoctorName") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("check_doctor_name") + .HasComment("检查医生"); + + b.Property("CheckItems") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("check_items") + .HasComment("检查部位"); + + b.Property("CheckTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("check_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)") + .HasComment("检查日期"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("character varying(1000)") + .HasColumnName("description") + .HasComment("检查所见"); + + b.Property("ImportTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("import_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)") + .HasComment("导入日期"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PatientRegisterNo") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("patient_register_no"); + + b.Property("Suggestion") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("suggestion") + .HasComment("建议"); + + b.Property("Summary") + .HasMaxLength(1000) + .HasColumnType("character varying(1000)") + .HasColumnName("summary") + .HasComment("诊断结论"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "PatientRegisterNo" }, "ix_import_pacs_result"); + + b.ToTable("import_pacs_result"); + + b.HasComment("PACS结果中间表"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.InvoiceItemType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_invoice_item_type") + .IsUnique(); + + b.ToTable("invoice_item_type"); + + b.HasComment("发票项目类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.InvoiceOrg", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_invoice_org") + .IsUnique(); + + b.ToTable("invoice_org"); + + b.HasComment("发票单位设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Item", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CalculationFunction") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("calculation_function"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DefaultResult") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("default_result"); + + b.Property("DiagnosisFunction") + .HasMaxLength(2000) + .HasColumnType("character varying(2000)") + .HasColumnName("diagnosis_function"); + + b.Property("DisplayName") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("EnglishShortName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("english_short_name"); + + b.Property("InputCheck") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("input_check"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active"); + + b.Property("IsCalculationItem") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_calculation_item"); + + b.Property("IsContinueProcess") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_continue_process"); + + b.Property("IsDiagnosisFunction") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_diagnosis_function"); + + b.Property("IsNameIntoSummary") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_name_into_summary"); + + b.Property("IsProduceSummary") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_produce_summary"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price"); + + b.Property("PriceItemId") + .HasMaxLength(8) + .HasColumnType("uuid") + .HasColumnName("price_item_id") + .IsFixedLength(); + + b.Property("ReferenceRangeTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("reference_range_type_flag") + .HasDefaultValueSql("'E'::bpchar"); + + b.Property("ResultTemplateTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("result_template_type_flag") + .HasDefaultValueSql("0"); + + b.Property("SimpleCode") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("simple_code"); + + b.Property("UnitId") + .HasColumnType("uuid") + .HasColumnName("unit_id") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("ItemTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_item") + .IsUnique(); + + b.ToTable("item"); + + b.HasComment("项目设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemDefaultResult", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_item_default_result") + .IsUnique(); + + b.ToTable("item_default_result"); + + b.HasComment("项目默认结果设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultMatch", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("结果匹配编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength() + .HasComment("诊断编号"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1") + .HasComment("显示顺序"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Result") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("result") + .HasComment("结果"); + + b.HasKey("Id"); + + b.HasIndex("DiagnosisId"); + + b.HasIndex("ItemId"); + + b.ToTable("item_result_match"); + + b.HasComment("结果匹配设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("结果模板编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength() + .HasComment("诊断编号"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("IsNameIntoSummary") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_name_into_summary") + .HasComment("小结前是否加名称"); + + b.Property("IsResultIntoSummary") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_result_into_summary"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Result") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("result") + .HasComment("结果"); + + b.Property("ResultStatusId") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("result_status_id") + .HasComment("结果状态"); + + b.Property("SimpleCode") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("simple_code") + .HasComment("拼音简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "ItemId", "Result" }, "ix_item_result_template") + .IsUnique(); + + b.ToTable("item_result_template"); + + b.HasComment("项目结果模板设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultTemplateType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "ItemId", "DisplayName" }, "ix_item_result_template_type") + .IsUnique(); + + b.ToTable("item_result_template_type"); + + b.HasComment("项目结果模板类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_item_template") + .IsUnique(); + + b.ToTable("item_template"); + + b.HasComment("项目模板设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemTemplateDetail", b => + { + b.Property("ItemTemplateId") + .HasColumnType("uuid") + .HasColumnName("item_template_id") + .IsFixedLength(); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength(); + + b.HasKey("ItemTemplateId", "ItemId") + .HasName("pk_item_template_detail"); + + b.HasIndex("ItemId"); + + b.ToTable("item_template_detail"); + + b.HasComment("项目模板明细"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CheckTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("check_type_flag") + .HasDefaultValueSql("'G'::bpchar"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("GuidTypeId") + .HasColumnType("uuid") + .HasColumnName("guid_type_id") + .IsFixedLength(); + + b.Property("IsMergeAsbitem") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_merge_asbitem"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MedicalReportTypeId") + .HasColumnType("uuid") + .HasColumnName("medical_report_type_id") + .IsFixedLength(); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength(); + + b.Property("PathCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("path_code"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("GuidTypeId"); + + b.HasIndex("MedicalReportTypeId"); + + b.HasIndex(new[] { "DisplayName", "ParentId" }, "ix_item_type") + .IsUnique(); + + b.ToTable("item_type"); + + b.HasComment("项目类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.LisRequest", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("IsPrint") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_print"); + + b.Property("IsSignIn") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_sign_in"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LisRequestNo") + .HasColumnType("uuid") + .HasColumnName("lis_request_no"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("SampleContainerId") + .HasColumnType("uuid") + .HasColumnName("sample_container_id") + .IsFixedLength(); + + b.Property("SampleTypeId") + .HasColumnType("uuid") + .HasColumnName("sample_type_id") + .IsFixedLength(); + + b.Property("Sampler") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("sampler"); + + b.Property("SamplingTime") + .HasColumnType("date") + .HasColumnName("sampling_time"); + + b.Property("SignInOrder") + .HasColumnType("integer") + .HasColumnName("sign_in_order"); + + b.Property("SignInPerson") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("sign_in_person"); + + b.Property("SignInTime") + .HasColumnType("date") + .HasColumnName("sign_in_time"); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.HasIndex("SampleContainerId"); + + b.HasIndex("SampleTypeId"); + + b.HasIndex(new[] { "LisRequestNo" }, "ix_lis_request") + .IsUnique(); + + b.ToTable("lis_request"); + + b.HasComment("检验申请单"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MaritalStatus", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("id") + .HasDefaultValueSql("'0'::bpchar") + .HasComment("婚姻状况编号"); + + b.Property("DisplayName") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("display_name") + .HasComment("婚姻状况名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("SimpleCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_marital_status") + .IsUnique(); + + b.ToTable("marital_status"); + + b.HasComment("婚姻状况设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalConclusion", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("体检结论编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("体检结论名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MedicalConclusionTypeId") + .HasMaxLength(2) + .HasColumnType("character(2)") + .HasColumnName("medical_conclusion_type_id") + .IsFixedLength(); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex("MedicalConclusionTypeId"); + + b.ToTable("medical_conclusion"); + + b.HasComment("体检结论设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalConclusionType", b => + { + b.Property("Id") + .HasMaxLength(2) + .HasColumnType("character(2)") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_medical_conclusion_type") + .IsUnique(); + + b.ToTable("medical_conclusion_type"); + + b.HasComment("体检结论类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalPackage", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("套餐主档编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1") + .HasComment("显示顺序"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar") + .HasComment("适用性别"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active") + .HasComment("启用标志"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price") + .HasComment("价格"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_medical_package") + .IsUnique(); + + b.ToTable("medical_package"); + + b.HasComment("体检套餐主档设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalPackageDetail", b => + { + b.Property("MedicalPackageId") + .HasColumnType("uuid") + .HasColumnName("medical_package_id") + .IsFixedLength(); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength(); + + b.HasKey("MedicalPackageId", "AsbitemId") + .HasName("pk_medical_package_detail"); + + b.HasIndex("AsbitemId"); + + b.ToTable("medical_package_detail"); + + b.HasComment("体检套餐包含的组合项目设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalReportType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("medical_report_type"); + + b.HasComment("体检报告类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("体检类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("体检类别名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_medical_type") + .IsUnique(); + + b.ToTable("medical_type"); + + b.HasComment("体检类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Nation", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("CountryCode") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("country_code"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("拼音简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_nation") + .IsUnique(); + + b.ToTable("nation"); + + b.HasComment("民族设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.OcCheckType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("职业病检查类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OcCheckTypeName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("oc_check_type_name") + .HasComment("职业病检查类别名称"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("oc_check_type"); + + b.HasComment("职业病检查类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.OperateLog", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ComputerName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("computer_name"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OperateContent") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("operate_content"); + + b.Property("OperateTime") + .HasColumnType("date") + .HasColumnName("operate_time"); + + b.Property("OperateType") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("operate_type"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark"); + + b.Property("Sqlsyntax") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("sqlsyntax"); + + b.Property("TableName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("table_name"); + + b.Property("UserId") + .HasMaxLength(16) + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("WindowName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("window_name"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "ComputerName" }, "ix_operate_log"); + + b.HasIndex(new[] { "WindowName" }, "ix_operate_log_1"); + + b.ToTable("operate_log"); + + b.HasComment("操作日志"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.OrganizationUnitsCustomerOrg", b => + { + b.Property("CustomerOrgId") + .HasColumnType("uuid") + .HasColumnName("customer_org_id") + .IsFixedLength(); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id") + .IsFixedLength(); + + b.HasKey("CustomerOrgId", "OrganizationUnitId") + .HasName("pk_medical_center_org"); + + b.HasIndex("OrganizationUnitId"); + + b.ToTable("organization_units_customer_org"); + + b.HasComment("体检中心单位权限"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Patient", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Address") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("address"); + + b.Property("BirthDate") + .HasColumnType("date") + .HasColumnName("birth_date"); + + b.Property("BirthPlaceId") + .HasColumnType("uuid") + .HasColumnName("birth_place_id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("display_name"); + + b.Property("Email") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("email"); + + b.Property("IdNo") + .HasMaxLength(18) + .HasColumnType("character varying(18)") + .HasColumnName("id_no"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MaritalStatusId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("marital_status_id"); + + b.Property("MobileTelephone") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("mobile_telephone"); + + b.Property("NationId") + .HasColumnType("uuid") + .HasColumnName("nation_id") + .IsFixedLength(); + + b.Property("PatientNo") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("patient_no"); + + b.Property("PatientPassword") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("patient_password"); + + b.Property("PostalCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("postal_code"); + + b.Property("SexId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("sex_id"); + + b.Property("Telephone") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("telephone"); + + b.HasKey("Id"); + + b.HasIndex("PatientNo") + .IsUnique(); + + b.HasIndex(new[] { "IdNo" }, "ix_patient"); + + b.HasIndex(new[] { "DisplayName" }, "ix_patient_1"); + + b.ToTable("patient"); + + b.HasComment("体检人员档案"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientOccupationalDisease", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AbnormalTimes") + .HasColumnType("integer") + .HasColumnName("abnormal_times"); + + b.Property("AbortionTimes") + .HasColumnType("integer") + .HasColumnName("abortion_times"); + + b.Property("ChildrenNum") + .HasColumnType("integer") + .HasColumnName("children_num"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DiagnosisDate") + .HasColumnType("date") + .HasColumnName("diagnosis_date"); + + b.Property("DiagnosisHospital") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("diagnosis_hospital"); + + b.Property("DrinkFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("drink_flag"); + + b.Property("DrinkNum") + .HasColumnType("integer") + .HasColumnName("drink_num"); + + b.Property("DrinkYears") + .HasColumnType("integer") + .HasColumnName("drink_years"); + + b.Property("FirstMenstruation") + .HasColumnType("integer") + .HasColumnName("first_menstruation"); + + b.Property("HandleSuggestion") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("handle_suggestion"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MenstrualHistory") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("menstrual_history"); + + b.Property("MenstruationCycle") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("menstruation_cycle"); + + b.Property("MenstruationEndAge") + .HasColumnType("integer") + .HasColumnName("menstruation_end_age"); + + b.Property("MenstruationFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("menstruation_flag"); + + b.Property("MenstruationTimeLength") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("menstruation_time_length"); + + b.Property("NoOccupAbSuggestion") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("no_occup_ab_suggestion"); + + b.Property("NoOccupationalAbnormal") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("no_occupational_abnormal"); + + b.Property("OcCheckTypeId") + .HasColumnType("uuid") + .HasColumnName("oc_check_type_id") + .IsFixedLength(); + + b.Property("OccupationalAbSuggestion") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("occupational_ab_suggestion"); + + b.Property("OccupationalAbnormal") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("occupational_abnormal"); + + b.Property("OccupationalDisease") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("occupational_disease"); + + b.Property("Other") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("other"); + + b.Property("PoisonWorkTime") + .HasMaxLength(6) + .HasColumnType("character varying(6)") + .HasColumnName("poison_work_time"); + + b.Property("PrematureBirthTimes") + .HasColumnType("integer") + .HasColumnName("premature_birth_times"); + + b.Property("PreviousHistory") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("previous_history"); + + b.Property("Recovery") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("recovery"); + + b.Property("SmokeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("smoke_flag"); + + b.Property("SmokeNum") + .HasColumnType("integer") + .HasColumnName("smoke_num"); + + b.Property("SmokeYears") + .HasColumnType("integer") + .HasColumnName("smoke_years"); + + b.Property("StillbirthTimes") + .HasColumnType("integer") + .HasColumnName("stillbirth_times"); + + b.Property("TotalWorkTime") + .HasMaxLength(6) + .HasColumnType("character varying(6)") + .HasColumnName("total_work_time"); + + b.HasKey("Id"); + + b.ToTable("patient_occupational_disease"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientOccupationalHistory", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("BeginDate") + .HasColumnType("date") + .HasColumnName("begin_date"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("EndDate") + .HasColumnType("date") + .HasColumnName("end_date"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Org") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("org"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("Poison") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("poison"); + + b.Property("ProtectiveMeasures") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("protective_measures"); + + b.Property("WorkShop") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("work_shop"); + + b.Property("WorkType") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("work_type"); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.ToTable("patient_occupational_history"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientPoison", b => + { + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("PoisonId") + .HasColumnType("uuid") + .HasColumnName("poison_id") + .IsFixedLength(); + + b.HasKey("PatientRegisterId", "PoisonId") + .HasName("pk_patient_poison"); + + b.HasIndex("PoisonId"); + + b.ToTable("patient_poison"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientRegister", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("登记流水号"); + + b.Property("Age") + .HasColumnType("smallint") + .HasColumnName("age") + .HasComment("年龄"); + + b.Property("AuditDate") + .HasColumnType("date") + .HasColumnName("audit_date"); + + b.Property("AuditDoctor") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("audit_doctor"); + + b.Property("BirthDate") + .HasColumnType("date") + .HasColumnName("birth_date"); + + b.Property("CompleteFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("complete_flag") + .HasDefaultValueSql("'0'::bpchar") + .HasComment("完成标志"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgGroupId") + .HasColumnType("uuid") + .HasColumnName("customer_org_group_id") + .IsFixedLength() + .HasComment("分组"); + + b.Property("CustomerOrgId") + .HasColumnType("uuid") + .HasColumnName("customer_org_id") + .IsFixedLength() + .HasComment("单位编号"); + + b.Property("CustomerOrgRegisterId") + .HasColumnType("uuid") + .HasColumnName("customer_org_register_id"); + + b.Property("GuidePrintTimes") + .HasColumnType("smallint") + .HasColumnName("guide_print_times"); + + b.Property("InterposeMeasure") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("interpose_measure") + .HasComment("干预措施"); + + b.Property("IsAudit") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_audit"); + + b.Property("IsLock") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_lock"); + + b.Property("IsMedicalStart") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_medical_start") + .HasComment("体检开始标志"); + + b.Property("IsNameHide") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_name_hide"); + + b.Property("IsPhoneFollow") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_phone_follow"); + + b.Property("IsRecoverGuide") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_recover_guide"); + + b.Property("IsUpload") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_upload"); + + b.Property("IsVip") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_vip"); + + b.Property("JobCardNo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("job_card_no") + .HasComment("工卡号"); + + b.Property("JobPost") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("job_post") + .HasComment("职务"); + + b.Property("JobTitle") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("job_title") + .HasComment("职称"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MaritalStatusId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("marital_status_id") + .HasDefaultValueSql("'0'::bpchar") + .HasComment("婚姻状况"); + + b.Property("MedicalCardNo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("medical_card_no"); + + b.Property("MedicalConclusionId") + .HasColumnType("uuid") + .HasColumnName("medical_conclusion_id") + .IsFixedLength() + .HasComment("体检结论"); + + b.Property("MedicalPackageId") + .HasColumnType("uuid") + .HasColumnName("medical_package_id") + .IsFixedLength() + .HasComment("套餐"); + + b.Property("MedicalStartDate") + .ValueGeneratedOnAdd() + .HasColumnType("date") + .HasColumnName("medical_start_date") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)") + .HasComment("体检开始日期"); + + b.Property("MedicalTimes") + .HasColumnType("smallint") + .HasColumnName("medical_times") + .HasComment("体检次数"); + + b.Property("MedicalTypeId") + .HasColumnType("uuid") + .HasColumnName("medical_type_id") + .IsFixedLength() + .HasComment("体检类别"); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id"); + + b.Property("PatientId") + .HasMaxLength(10) + .HasColumnType("uuid") + .HasColumnName("patient_id") + .HasComment("档案号"); + + b.Property("PatientName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("patient_name") + .HasComment("姓名"); + + b.Property("PatientRegisterNo") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("patient_register_no") + .HasComment("条码号"); + + b.Property("PersonnelTypeId") + .HasColumnType("uuid") + .HasColumnName("personnel_type_id") + .IsFixedLength() + .HasComment("人员类别"); + + b.Property("Photo") + .HasColumnType("bytea") + .HasColumnName("photo") + .HasComment("照片"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark"); + + b.Property("ReportPrintTimes") + .HasColumnType("smallint") + .HasColumnName("report_print_times") + .HasComment("体检报告打印次数"); + + b.Property("Salesman") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("salesman") + .HasComment("介绍人"); + + b.Property("SexHormoneTermId") + .HasColumnType("uuid") + .HasColumnName("sex_hormone_term_id") + .IsFixedLength(); + + b.Property("SexId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("sex_id") + .HasComment("性别"); + + b.Property("SummaryDate") + .HasColumnType("date") + .HasColumnName("summary_date") + .HasComment("总检日期"); + + b.Property("SummaryDoctor") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("summary_doctor") + .HasComment("总检医生"); + + b.Property("ThirdInfo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("third_info"); + + b.HasKey("Id"); + + b.HasIndex("MaritalStatusId"); + + b.HasIndex(new[] { "CustomerOrgRegisterId" }, "fki_fk_patient_register_org_register"); + + b.HasIndex(new[] { "OrganizationUnitId" }, "fki_fk_patient_register_ororganization_unit"); + + b.HasIndex(new[] { "PatientRegisterNo" }, "ix_patient_register") + .IsUnique(); + + b.HasIndex(new[] { "PatientId", "MedicalTimes" }, "ix_patient_register_1") + .IsUnique(); + + b.HasIndex(new[] { "PatientName" }, "ix_patient_register_2"); + + b.ToTable("patient_register"); + + b.HasComment("体检登记主档"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientSymptom", b => + { + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("SymptomId") + .HasColumnType("uuid") + .HasColumnName("symptom_id") + .IsFixedLength(); + + b.Property("Degree") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("degree"); + + b.Property("TimeLength") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("time_length"); + + b.HasKey("PatientRegisterId", "SymptomId") + .HasName("pk_patient_symptom"); + + b.HasIndex("SymptomId"); + + b.ToTable("patient_symptom"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PayMode", b => + { + b.Property("Id") + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_payment_mode") + .IsUnique(); + + b.ToTable("pay_mode"); + + b.HasComment("支付方式设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PersonnelType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("人员类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("人员类别名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_personnel_type") + .IsUnique(); + + b.ToTable("personnel_type"); + + b.HasComment("人员类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PhoneFollow", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("FollowContent") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("follow_content"); + + b.Property("FollowUpPlanId") + .HasColumnType("uuid") + .HasColumnName("follow_up_plan_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("ReplyContent") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("reply_content"); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.ToTable("phone_follow"); + + b.HasComment("电话随访"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Poison", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("毒害编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("毒害名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PoisonTypeId") + .HasColumnType("uuid") + .HasColumnName("poison_type_id") + .IsFixedLength(); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("PoisonTypeId"); + + b.ToTable("poison"); + + b.HasComment("毒害因素设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PoisonType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("毒害类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("毒害类别名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("poison_type"); + + b.HasComment("毒害因素类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PositionType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("职务编号"); + + b.Property("CreationTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("职务名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime") + .HasComment("最后修改日期"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId") + .HasComment("最后修改者"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_position_type") + .IsUnique(); + + b.ToTable("position_type"); + + b.HasComment("职务类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PriceItem", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("InvoiceItemTypeId") + .HasColumnType("uuid") + .HasColumnName("invoice_item_type_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price"); + + b.Property("PriceItemCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("price_item_code"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("InvoiceItemTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_price_item") + .IsUnique(); + + b.ToTable("price_item"); + + b.HasComment("价表项目设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PrimarykeyBuilder", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("主键编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DateString") + .HasMaxLength(8) + .HasColumnType("character(8)") + .HasColumnName("date_string") + .IsFixedLength() + .HasComment("日期"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SerialNo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("serial_no") + .HasComment("序列号"); + + b.HasKey("Id"); + + b.ToTable("primarykey_builder"); + + b.HasComment("主键产生器"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.QueueRegister", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CallTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("call_time"); + + b.Property("CompleteFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("complete_flag") + .HasDefaultValueSql("0"); + + b.Property("CreationTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("NoCompleteReason") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("no_complete_reason") + .HasDefaultValueSql("0"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("RoomId") + .HasColumnType("uuid") + .HasColumnName("room_id") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.ToTable("queue_register"); + + b.HasComment("排队登记"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ReferenceRange", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("参考范围编号"); + + b.Property("AgeLowerLimit") + .HasColumnType("smallint") + .HasColumnName("age_lower_limit") + .HasComment("年龄下限"); + + b.Property("AgeUpperLimit") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasColumnName("age_upper_limit") + .HasDefaultValueSql("200") + .HasComment("年龄上限"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CriticalRangeValue") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("critical_range_value"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar") + .HasComment("性别"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LowerDiagnosisId") + .HasColumnType("uuid") + .HasColumnName("lower_diagnosis_id") + .IsFixedLength() + .HasComment("偏低诊断"); + + b.Property("ReferenceRangeTypeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("reference_range_type_flag"); + + b.Property("ReferenceRangeValue") + .HasMaxLength(150) + .HasColumnType("character varying(150)") + .HasColumnName("reference_range_value"); + + b.Property("UpperDiagnosisId") + .HasColumnType("uuid") + .HasColumnName("upper_diagnosis_id") + .IsFixedLength() + .HasComment("偏高诊断"); + + b.HasKey("Id"); + + b.HasIndex("ItemId"); + + b.ToTable("reference_range"); + + b.HasComment("项目参考范围设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterAsbitem", b => + { + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id"); + + b.Property("AsbitemId") + .HasMaxLength(6) + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength() + .HasComment("组合项目"); + + b.Property("Amount") + .HasColumnType("smallint") + .HasColumnName("amount"); + + b.Property("ChargePrice") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_price") + .HasComment("实收价格"); + + b.Property("IsCharge") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_charge") + .HasComment("是否已收费"); + + b.Property("LisRequestId") + .HasMaxLength(20) + .HasColumnType("uuid") + .HasColumnName("lis_request_id"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("登记流水号"); + + b.Property("PayTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("pay_type_flag") + .HasDefaultValueSql("0") + .HasComment("支付方式,比如是自费、免费、单位支付"); + + b.Property("RegisterAsbitemId") + .HasColumnType("uuid") + .HasColumnName("register_asbitem_id"); + + b.Property("StandardPrice") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("standard_price") + .HasComment("标准价格"); + + b.HasKey("RegisterCheckId", "AsbitemId") + .HasName("pk_register_asbitem"); + + b.HasIndex("AsbitemId"); + + b.HasIndex(new[] { "PatientRegisterId", "AsbitemId" }, "ix_register_asbitem") + .IsUnique(); + + b.ToTable("register_asbitem"); + + b.HasComment("检查组合项目记录"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheck", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AuditTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("audit_time"); + + b.Property("AuditorUserId") + .HasColumnType("uuid") + .HasColumnName("auditor_user_id"); + + b.Property("CheckDate") + .HasColumnType("date") + .HasColumnName("check_date"); + + b.Property("CheckDoctorId") + .HasColumnType("uuid") + .HasColumnName("check_doctor_id"); + + b.Property("CheckRequestNo") + .HasMaxLength(20) + .HasColumnType("uuid") + .HasColumnName("check_request_no"); + + b.Property("CheckRequestPrintTimes") + .HasColumnType("smallint") + .HasColumnName("check_request_print_times"); + + b.Property("CompleteFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("complete_flag") + .HasDefaultValueSql("0"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CriticalValue") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("critical_value"); + + b.Property("CriticalValueCreateDate") + .HasColumnType("date") + .HasColumnName("critical_value_create_date"); + + b.Property("CriticalValueFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("critical_value_flag") + .HasDefaultValueSql("0"); + + b.Property("CriticalValueProcessContent") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("critical_value_process_content"); + + b.Property("CriticalValueProcessDate") + .HasColumnType("date") + .HasColumnName("critical_value_process_date"); + + b.Property("CriticalValueProcessDoctor") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("critical_value_process_doctor"); + + b.Property("CriticalValueProcessFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("critical_value_process_flag"); + + b.Property("IsAudit") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_audit"); + + b.Property("IsLock") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_lock"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ThirdInfo") + .HasMaxLength(80) + .HasColumnType("character varying(80)") + .HasColumnName("third_info"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "CheckRequestNo" }, "ix_register_check_1"); + + b.ToTable("register_check"); + + b.HasComment("登记检查单"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckCriticalValue", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CriticalValue") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("critical_value"); + + b.Property("Doctor") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("doctor"); + + b.Property("IsComplete") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_complete"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ProcessTypeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("process_type_flag"); + + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id"); + + b.HasKey("Id"); + + b.ToTable("register_check_critical_value"); + + b.HasComment("检查危急值"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckItem", b => + { + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目"); + + b.Property("CheckDate") + .HasColumnType("date") + .HasColumnName("check_date") + .HasComment("检查日期"); + + b.Property("CheckDoctorName") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("check_doctor_name") + .HasComment("检查医生"); + + b.Property("CriticalRangeValue") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("critical_range_value"); + + b.Property("CriticalValue") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("critical_value"); + + b.Property("ReferenceRangeValue") + .ValueGeneratedOnAdd() + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("reference_range_value") + .HasDefaultValueSql("''::character varying") + .HasComment("参考范围"); + + b.Property("Result") + .HasMaxLength(1000) + .HasColumnType("character varying(1000)") + .HasColumnName("result") + .HasComment("结果"); + + b.Property("ResultStatusId") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("result_status_id") + .HasComment("报告单提示"); + + b.Property("Unit") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("unit"); + + b.HasKey("RegisterCheckId", "ItemId") + .HasName("pk_register_item_1"); + + b.HasIndex("ItemId"); + + b.HasIndex("ResultStatusId"); + + b.ToTable("register_check_item"); + + b.HasComment("检查明细项目记录"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckPicture", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("检查图片编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1") + .HasComment("显示顺序"); + + b.Property("IsPrint") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_print") + .HasComment("打印标志"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PictureFilename") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("picture_filename") + .HasComment("图片名"); + + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id") + .HasComment("登记流水号"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "RegisterCheckId", "PictureFilename" }, "ix_check_picture") + .IsUnique(); + + b.ToTable("register_check_picture"); + + b.HasComment("体检登记组合项目图片"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckSuggestion", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id"); + + b.Property("Suggestion") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("suggestion"); + + b.HasKey("Id"); + + b.HasIndex("RegisterCheckId"); + + b.ToTable("register_check_suggestion"); + + b.HasComment("登记检查建议"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckSummary", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id"); + + b.Property("Summary") + .HasMaxLength(500) + .HasColumnType("character varying(500)") + .HasColumnName("summary"); + + b.Property("SummaryFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("summary_flag"); + + b.HasKey("Id"); + + b.HasIndex("RegisterCheckId"); + + b.ToTable("register_check_summary"); + + b.HasComment("登记检查综述"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ResultStatus", b => + { + b.Property("Id") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("id"); + + b.Property("DataInputBackgroundColor") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("data_input_background_color") + .HasDefaultValueSql("16777215"); + + b.Property("DataInputFontColor") + .HasColumnType("integer") + .HasColumnName("data_input_font_color"); + + b.Property("DataInputPrompt") + .HasMaxLength(8) + .HasColumnType("character varying(8)") + .HasColumnName("data_input_prompt"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("ReportBackgroundColor") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("report_background_color") + .HasDefaultValueSql("16777215"); + + b.Property("ReportFontColor") + .HasColumnType("integer") + .HasColumnName("report_font_color"); + + b.Property("ReportPrompt") + .HasMaxLength(8) + .HasColumnType("character varying(8)") + .HasColumnName("report_prompt"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_result_status") + .IsUnique(); + + b.ToTable("result_status"); + + b.HasComment("结果状态设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Room", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DepartmentId") + .HasColumnType("uuid") + .HasColumnName("department_id") + .IsFixedLength(); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("RoomTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("room_type_flag") + .HasDefaultValueSql("0"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("DepartmentId"); + + b.HasIndex("ItemTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_room") + .IsUnique(); + + b.ToTable("room"); + + b.HasComment("房间设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleContainer", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("ContainerColor") + .HasColumnType("integer") + .HasColumnName("container_color"); + + b.Property("ContainerColorName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("container_color_name"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_sample_container") + .IsUnique(); + + b.ToTable("sample_container"); + + b.HasComment("标本容器设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleGroup", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SampleContainerId") + .HasColumnType("uuid") + .HasColumnName("sample_container_id") + .IsFixedLength(); + + b.Property("SampleTypeId") + .HasColumnType("uuid") + .HasColumnName("sample_type_id") + .IsFixedLength(); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("SampleContainerId"); + + b.HasIndex("SampleTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_sample_group") + .IsUnique(); + + b.ToTable("sample_group"); + + b.HasComment("标本分组设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleGroupDetail", b => + { + b.Property("SampleGroupId") + .HasColumnType("uuid") + .HasColumnName("sample_group_id") + .IsFixedLength(); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength(); + + b.HasKey("SampleGroupId", "AsbitemId") + .HasName("pk_sample_group_detail"); + + b.HasIndex(new[] { "AsbitemId" }, "ix_sample_group_detail") + .IsUnique(); + + b.ToTable("sample_group_detail"); + + b.HasComment("标本分组包含组合项目设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_sample_type"); + + b.ToTable("sample_type"); + + b.HasComment("标本类型设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ServiceTrade", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DepartmentId") + .HasColumnType("uuid") + .HasColumnName("department_id") + .IsFixedLength(); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("ValidPeriod") + .HasColumnType("smallint") + .HasColumnName("valid_period") + .HasComment("有效期"); + + b.Property("ValidPeriodDisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("valid_period_display_name"); + + b.Property("ValidPeriodUnit") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("valid_period_unit"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DepartmentId", "DisplayName" }, "ix_service_trades") + .IsUnique(); + + b.ToTable("service_trades"); + + b.HasComment("服务行业设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SettleAccount", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CompletedBy") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("completed_by"); + + b.Property("CompletedTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("completed_time"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("IsComplete") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_complete"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.ToTable("settle_account"); + + b.HasComment("结账"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Sex", b => + { + b.Property("Id") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("id"); + + b.Property("DisplayName") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("SimpleCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("sex"); + + b.HasComment("性别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SexHormoneReferenceRange", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("AgeLowerLimit") + .HasColumnType("smallint") + .HasColumnName("age_lower_limit"); + + b.Property("AgeUpperLimit") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasColumnName("age_upper_limit") + .HasDefaultValueSql("200"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CriticalRangeValue") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("critical_range_value"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LowerDiagnosisId") + .HasColumnType("uuid") + .HasColumnName("lower_diagnosis_id") + .IsFixedLength(); + + b.Property("ReferenceRangeValue") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("reference_range_value"); + + b.Property("SexHormoneTermId") + .HasColumnType("uuid") + .HasColumnName("sex_hormone_term_id") + .IsFixedLength(); + + b.Property("UpperDiagnosisId") + .HasColumnType("uuid") + .HasColumnName("upper_diagnosis_id") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("ItemId"); + + b.HasIndex("SexHormoneTermId"); + + b.ToTable("sex_hormone_reference_range"); + + b.HasComment("性激素参考范围设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SexHormoneTerm", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_sex_hormone_term") + .IsUnique(); + + b.ToTable("sex_hormone_term"); + + b.HasComment("性激素期限设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SmsSend", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Content") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("content"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("FollowUpPlanId") + .HasColumnType("uuid") + .HasColumnName("follow_up_plan_id"); + + b.Property("IsComplete") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_complete"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MobileTelephone") + .HasMaxLength(11) + .HasColumnType("character varying(11)") + .HasColumnName("mobile_telephone"); + + b.Property("PatientId") + .HasMaxLength(10) + .HasColumnType("uuid") + .HasColumnName("patient_id"); + + b.Property("PatientName") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("patient_name"); + + b.Property("SmsTypeId") + .HasColumnType("uuid") + .HasColumnName("sms_type_id") + .IsFixedLength(); + + b.HasKey("Id"); + + b.ToTable("sms_send"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SmsTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("Content") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("content"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("smallint") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("SmsTypeId") + .HasColumnType("uuid") + .HasColumnName("sms_type_id") + .IsFixedLength(); + + b.HasKey("Id"); + + b.ToTable("sms_template"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SmsType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("smallint") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("sms_type"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Suggestion", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength(); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SuggestionContent") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("suggestion_content"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DiagnosisId", "SuggestionContent" }, "ix_suggestion") + .IsUnique(); + + b.ToTable("suggestion"); + + b.HasComment("建议设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumDiagnosis", b => + { + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength(); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("SumSuggestionHeaderId") + .HasColumnType("uuid") + .HasColumnName("sum_suggestion_header_id"); + + b.HasKey("PatientRegisterId", "DiagnosisId") + .HasName("pk_summary_diagnosis"); + + b.HasIndex("DiagnosisId"); + + b.ToTable("sum_diagnosis"); + + b.HasComment("总检诊断"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SummaryTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("TemplateContent") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("template_content"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_summary_template") + .IsUnique(); + + b.ToTable("summary_template"); + + b.HasComment("综述模板设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSuggestionContent", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SuggestionContent") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("suggestion_content"); + + b.Property("SumSuggestionHeaderId") + .HasColumnType("uuid") + .HasColumnName("sum_suggestion_header_id"); + + b.HasKey("Id"); + + b.HasIndex("SumSuggestionHeaderId"); + + b.ToTable("sum_suggestion_content"); + + b.HasComment("总检建议内容"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSuggestionHeader", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("SuggestionFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("suggestion_flag"); + + b.Property("SuggestionTitle") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("suggestion_title"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "PatientRegisterId", "SuggestionTitle" }, "ix_sum_suggestion_title") + .IsUnique(); + + b.ToTable("sum_suggestion_header"); + + b.HasComment("总检建议头"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSummaryContent", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SumSummaryHeaderId") + .HasColumnType("uuid") + .HasColumnName("sum_summary_header_id"); + + b.Property("SummaryContent") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("summary_content"); + + b.HasKey("Id"); + + b.HasIndex("SumSummaryHeaderId"); + + b.ToTable("sum_summary_content"); + + b.HasComment("总检综述内容"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSummaryHeader", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("SummaryFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("summary_flag"); + + b.Property("SummaryTitle") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("summary_title"); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.ToTable("sum_summary_header"); + + b.HasComment("总检综述头"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Symptom", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("症状编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("症状名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("symptom"); + + b.HasComment("症状"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Sysdiagram", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("Definition") + .HasColumnType("bytea") + .HasColumnName("definition"); + + b.Property("DisplayName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("display_name"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PrincipalId") + .HasColumnType("uuid") + .HasColumnName("principal_id"); + + b.Property("Version") + .HasColumnType("integer") + .HasColumnName("version"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "PrincipalId", "DisplayName" }, "uk_principal_name") + .IsUnique(); + + b.ToTable("sysdiagrams"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParm", b => + { + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("SysParmTypeId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("sys_parm_type_id"); + + b.Property("ValueType") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("value_type"); + + b.HasKey("Id"); + + b.HasIndex("SysParmTypeId"); + + b.ToTable("sys_parm"); + + b.HasComment("系统参数设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmType", b => + { + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("parent_id"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("sys_parm_type"); + + b.HasComment("系统参数类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmValue", b => + { + b.Property("SysParmId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("sys_parm_id"); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParmValue") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("parm_value"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark"); + + b.HasKey("SysParmId", "OrganizationUnitId") + .HasName("pk_sys_parm_value"); + + b.ToTable("sys_parm_value"); + + b.HasComment("系统参数值设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmValueOption", b => + { + b.Property("SysParmId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("sys_parm_id"); + + b.Property("ValueOption") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("value_option"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("ValueOptionName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("value_option_name"); + + b.HasKey("SysParmId", "ValueOption") + .HasName("pk_sys_parm_value_option"); + + b.ToTable("sys_parm_value_option"); + + b.HasComment("系统参数可选值设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.TitleType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("职称类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("职称类别名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_title_type") + .IsUnique(); + + b.ToTable("title_type"); + + b.HasComment("职称类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Unit", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("unit"); + + b.HasComment("单位设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.User", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Address") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("address"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DepartmentId") + .HasColumnType("uuid") + .HasColumnName("department_id") + .IsFixedLength(); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("Email") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("email"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LockScreenTimeInterval") + .HasColumnType("integer") + .HasColumnName("lock_screen_time_interval"); + + b.Property("ModifiedDate") + .ValueGeneratedOnAdd() + .HasColumnType("date") + .HasColumnName("modified_date") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("Modifier") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("modifier"); + + b.Property("PasswordHash") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("password_hash"); + + b.Property("PasswordSalt") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("password_salt"); + + b.Property("Photo") + .HasColumnType("bytea") + .HasColumnName("photo"); + + b.Property("PositionTypeId") + .HasColumnType("uuid") + .HasColumnName("position_type_id"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark"); + + b.Property("SexId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("sex_id"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("Telephone") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("telephone"); + + b.Property("TitleTypeId") + .HasColumnType("uuid") + .HasColumnName("title_type_id"); + + b.Property("UserTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("user_type_flag") + .HasDefaultValueSql("0") + .HasComment("用户类型"); + + b.HasKey("Id"); + + b.HasIndex("DepartmentId"); + + b.ToTable("users"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserDepartment", b => + { + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("DepartmentId") + .HasColumnType("uuid") + .HasColumnName("department_id") + .IsFixedLength(); + + b.HasKey("UserId", "DepartmentId") + .HasName("pk_user_operate_department"); + + b.HasIndex("DepartmentId"); + + b.ToTable("user_department"); + + b.HasComment("用户科室操作权限"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserGrouping", b => + { + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("GroupingId") + .HasColumnType("uuid") + .HasColumnName("grouping_id"); + + b.HasKey("UserId", "GroupingId") + .HasName("pk_user_grouping"); + + b.HasIndex("GroupingId"); + + b.ToTable("user_grouping"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserItemType", b => + { + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength(); + + b.HasKey("UserId", "ItemTypeId") + .HasName("pk_user_item_type"); + + b.HasIndex("ItemTypeId"); + + b.ToTable("user_item_type"); + + b.HasComment("用户项目类别权限设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserRight", b => + { + b.Property("Application") + .HasMaxLength(32) + .HasColumnType("character varying(32)") + .HasColumnName("application"); + + b.Property("WindowName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("window_name"); + + b.Property("ControlName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("control_name"); + + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("IsUser") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_user"); + + b.Property("Status") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("status"); + + b.HasKey("Application", "WindowName", "ControlName", "UserId", "IsUser") + .HasName("pk_sys_function"); + + b.ToTable("user_rights"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("character varying(96)") + .HasColumnName("ApplicationName"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("BrowserInfo"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("ClientId"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("ClientIpAddress"); + + b.Property("ClientName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("ClientName"); + + b.Property("Comments") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("Comments"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("CorrelationId"); + + b.Property("Exceptions") + .HasColumnType("text"); + + b.Property("ExecutionDuration") + .HasColumnType("integer") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("timestamp without time zone"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("HttpMethod") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("HttpMethod"); + + b.Property("HttpStatusCode") + .HasColumnType("integer") + .HasColumnName("HttpStatusCode"); + + b.Property("ImpersonatorTenantId") + .HasColumnType("uuid") + .HasColumnName("ImpersonatorTenantId"); + + b.Property("ImpersonatorTenantName") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("ImpersonatorTenantName"); + + b.Property("ImpersonatorUserId") + .HasColumnType("uuid") + .HasColumnName("ImpersonatorUserId"); + + b.Property("ImpersonatorUserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("ImpersonatorUserName"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("TenantName"); + + b.Property("Url") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("Url"); + + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("UserId"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ExecutionTime"); + + b.HasIndex("TenantId", "UserId", "ExecutionTime"); + + b.ToTable("AbpAuditLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("AuditLogId") + .HasColumnType("uuid") + .HasColumnName("AuditLogId"); + + b.Property("ExecutionDuration") + .HasColumnType("integer") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("ExecutionTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("MethodName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("MethodName"); + + b.Property("Parameters") + .HasMaxLength(2000) + .HasColumnType("character varying(2000)") + .HasColumnName("Parameters"); + + b.Property("ServiceName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("ServiceName"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); + + b.ToTable("AbpAuditLogActions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("AuditLogId") + .HasColumnType("uuid") + .HasColumnName("AuditLogId"); + + b.Property("ChangeTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("ChangeTime"); + + b.Property("ChangeType") + .HasColumnType("smallint") + .HasColumnName("ChangeType"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("EntityId"); + + b.Property("EntityTenantId") + .HasColumnType("uuid"); + + b.Property("EntityTypeFullName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("EntityTypeFullName"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); + + b.ToTable("AbpEntityChanges", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("EntityChangeId") + .HasColumnType("uuid"); + + b.Property("NewValue") + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("NewValue"); + + b.Property("OriginalValue") + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("OriginalValue"); + + b.Property("PropertyName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("PropertyName"); + + b.Property("PropertyTypeFullName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("PropertyTypeFullName"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityChangeId"); + + b.ToTable("AbpEntityPropertyChanges", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsAbandoned") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false); + + b.Property("JobArgs") + .IsRequired() + .HasMaxLength(1048576) + .HasColumnType("character varying(1048576)"); + + b.Property("JobName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("LastTryTime") + .HasColumnType("timestamp without time zone"); + + b.Property("NextTryTime") + .HasColumnType("timestamp without time zone"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasDefaultValue((byte)15); + + b.Property("TryCount") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasDefaultValue((short)0); + + b.HasKey("Id"); + + b.HasIndex("IsAbandoned", "NextTryTime"); + + b.ToTable("AbpBackgroundJobs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpFeatureValues", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsStatic") + .HasColumnType("boolean"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("Regex") + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("RegexDescription") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("Required") + .HasColumnType("boolean"); + + b.Property("ValueType") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("SourceTenantId") + .HasColumnType("uuid"); + + b.Property("SourceUserId") + .HasColumnType("uuid"); + + b.Property("TargetTenantId") + .HasColumnType("uuid"); + + b.Property("TargetUserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique(); + + b.ToTable("AbpLinkUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDefault") + .HasColumnType("boolean") + .HasColumnName("IsDefault"); + + b.Property("IsPublic") + .HasColumnType("boolean") + .HasColumnName("IsPublic"); + + b.Property("IsStatic") + .HasColumnType("boolean") + .HasColumnName("IsStatic"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.Property("RoleId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Action") + .HasMaxLength(96) + .HasColumnType("character varying(96)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("character varying(96)"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("Identity") + .HasMaxLength(96) + .HasColumnType("character varying(96)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Action"); + + b.HasIndex("TenantId", "ApplicationName"); + + b.HasIndex("TenantId", "Identity"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSecurityLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("boolean") + .HasColumnName("IsActive"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsExternal") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsExternal"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); + + b.Property("LockoutEnd") + .HasColumnType("timestamp with time zone"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("Name"); + + b.Property("NormalizedEmail") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("NormalizedEmail"); + + b.Property("NormalizedUserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("NormalizedUserName"); + + b.Property("PasswordHash") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("PasswordHash"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("SecurityStamp"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("Email"); + + b.HasIndex("NormalizedEmail"); + + b.HasIndex("NormalizedUserName"); + + b.HasIndex("UserName"); + + b.ToTable("AbpUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderDisplayName") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(196) + .HasColumnType("character varying(196)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "LoginProvider"); + + b.HasIndex("LoginProvider", "ProviderKey"); + + b.ToTable("AbpUserLogins", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uuid"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "UserId"); + + b.HasIndex("UserId", "OrganizationUnitId"); + + b.ToTable("AbpUserOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("RoleId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId", "UserId"); + + b.ToTable("AbpUserRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasColumnType("text"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(95) + .HasColumnType("character varying(95)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsPeis") + .HasMaxLength(1) + .HasColumnType("character varying(1)"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code"); + + b.HasIndex("ParentId"); + + b.ToTable("AbpOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uuid"); + + b.Property("RoleId") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "RoleId"); + + b.HasIndex("RoleId", "OrganizationUnitId"); + + b.ToTable("AbpOrganizationUnitRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ClientId") + .HasMaxLength(100) + .HasColumnType("character varying(100)"); + + b.Property("ClientSecret") + .HasColumnType("text"); + + b.Property("ClientUri") + .HasColumnType("text"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConsentType") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .HasColumnType("text"); + + b.Property("DisplayNames") + .HasColumnType("text"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LogoUri") + .HasColumnType("text"); + + b.Property("Permissions") + .HasColumnType("text"); + + b.Property("PostLogoutRedirectUris") + .HasColumnType("text"); + + b.Property("Properties") + .HasColumnType("text"); + + b.Property("RedirectUris") + .HasColumnType("text"); + + b.Property("Requirements") + .HasColumnType("text"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("OpenIddictApplications", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ApplicationId") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("timestamp without time zone"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Properties") + .HasColumnType("text"); + + b.Property("Scopes") + .HasColumnType("text"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("character varying(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictAuthorizations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Scopes.OpenIddictScope", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("text"); + + b.Property("Descriptions") + .HasColumnType("text"); + + b.Property("DisplayName") + .HasColumnType("text"); + + b.Property("DisplayNames") + .HasColumnType("text"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(200) + .HasColumnType("character varying(200)"); + + b.Property("Properties") + .HasColumnType("text"); + + b.Property("Resources") + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("OpenIddictScopes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ApplicationId") + .HasColumnType("uuid"); + + b.Property("AuthorizationId") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("timestamp without time zone"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExpirationDate") + .HasColumnType("timestamp without time zone"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Payload") + .HasColumnType("text"); + + b.Property("Properties") + .HasColumnType("text"); + + b.Property("RedemptionDate") + .HasColumnType("timestamp without time zone"); + + b.Property("ReferenceId") + .HasMaxLength(100) + .HasColumnType("character varying(100)"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("character varying(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.HasKey("Id"); + + b.HasIndex("AuthorizationId"); + + b.HasIndex("ReferenceId"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpPermissionGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("character varying(2048)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpSettings", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("AbpTenants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("uuid"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.HasKey("TenantId", "Name"); + + b.ToTable("AbpTenantConnectionStrings", (string)null); + }); + + modelBuilder.Entity("ChildDiagnosis", b => + { + b.HasOne("Shentun.Peis.Models.Diagnosis", null) + .WithMany() + .HasForeignKey("DiagnosisId") + .IsRequired() + .HasConstraintName("fk_child_diagnosis_diagnosis1"); + + b.HasOne("Shentun.Peis.Models.Diagnosis", null) + .WithMany() + .HasForeignKey("ParentDiagnosisId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_child_diagnosis_diagnosis"); + }); + + modelBuilder.Entity("RoomAsbitem", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", null) + .WithMany() + .HasForeignKey("AsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_room_asbitem_asbitem"); + + b.HasOne("Shentun.Peis.Models.Room", null) + .WithMany() + .HasForeignKey("RoomId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_room_asbitem_room"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.HelloA", b => + { + b.HasOne("Shentun.Peis.Books.HelloType", "HelloType") + .WithMany("HelloAs") + .HasForeignKey("HelloTypeId") + .IsRequired() + .HasConstraintName("fk_hello_a_hello_type"); + + b.Navigation("HelloType"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.TestB", b => + { + b.HasOne("Shentun.Peis.Books.TestA", "TestAs") + .WithMany("TestBs") + .HasForeignKey("TestAsAId"); + + b.Navigation("TestAs"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Asbitem", b => + { + b.HasOne("Shentun.Peis.Models.InvoiceItemType", "InvoiceItemType") + .WithMany("Asbitems") + .HasForeignKey("InvoiceItemTypeId") + .IsRequired() + .HasConstraintName("fk_asbitem_invoice_item_type"); + + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("Asbitems") + .HasForeignKey("ItemTypeId") + .IsRequired() + .HasConstraintName("fk_asbitem_item_type"); + + b.Navigation("InvoiceItemType"); + + b.Navigation("ItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.AsbitemDetail", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithMany("AsbitemDetails") + .HasForeignKey("AsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_asbitem_detail_asbitem"); + + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("AsbitemDetails") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_asbitem_detail_item"); + + b.Navigation("Asbitem"); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultConclusion", b => + { + b.HasOne("Shentun.Peis.Models.BigtextResultTemplate", "BigtextResultTemplate") + .WithMany("BigtextResultConclusions") + .HasForeignKey("BigtextResultTemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_bigtext"); + + b.Navigation("BigtextResultTemplate"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultDescription", b => + { + b.HasOne("Shentun.Peis.Models.BigtextResultTemplate", "BigtextResultTemplate") + .WithMany("BigtextResultDescriptions") + .HasForeignKey("BigtextResultTemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_bigtext"); + + b.Navigation("BigtextResultTemplate"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultTemplate", b => + { + b.HasOne("Shentun.Peis.Models.BigtextResultType", "BigtextResultType") + .WithMany("BigtextResultTemplates") + .HasForeignKey("BigtextResultTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_bigtext"); + + b.Navigation("BigtextResultType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultType", b => + { + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("BigtextResultTypes") + .HasForeignKey("ItemTypeId") + .IsRequired() + .HasConstraintName("fk_bigtext"); + + b.Navigation("ItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardBill", b => + { + b.HasOne("Shentun.Peis.Models.CardRegister", "CardRegister") + .WithMany("CardBills") + .HasForeignKey("CardRegisterId") + .IsRequired() + .HasConstraintName("fk_card_bil_reference_card_reg"); + + b.HasOne("Shentun.Peis.Models.PayMode", "PayMode") + .WithMany("CardBills") + .HasForeignKey("PayModeId") + .HasConstraintName("fk_card_bill_payment_mode"); + + b.Navigation("CardRegister"); + + b.Navigation("PayMode"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardRegister", b => + { + b.HasOne("Shentun.Peis.Models.CardType", "CardType") + .WithMany("CardRegisters") + .HasForeignKey("CardTypeId") + .IsRequired() + .HasConstraintName("fk_card_reg_reference_card_typ"); + + b.HasOne("Shentun.Peis.Models.Department", "OrganizationUnit") + .WithMany("CardRegisters") + .HasForeignKey("OrganizationUnitId") + .IsRequired() + .HasConstraintName("fk_card_register_department"); + + b.Navigation("CardType"); + + b.Navigation("OrganizationUnit"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Charge", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("Charges") + .HasForeignKey("PatientRegisterId") + .IsRequired() + .HasConstraintName("fk_patient_register_charge"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeAsbitem", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithMany("ChargeAsbitems") + .HasForeignKey("AsbitemId") + .IsRequired() + .HasConstraintName("fk_charge_asbitem_asbitem"); + + b.HasOne("Shentun.Peis.Models.Charge", "Charge") + .WithMany("ChargeAsbitems") + .HasForeignKey("ChargeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_charge_asbitem_charge"); + + b.Navigation("Asbitem"); + + b.Navigation("Charge"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeBack", b => + { + b.HasOne("Shentun.Peis.Models.Charge", "Charge") + .WithMany("ChargeBacks") + .HasForeignKey("ChargeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_bill_bac_reference_bill"); + + b.Navigation("Charge"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeBackPay", b => + { + b.HasOne("Shentun.Peis.Models.ChargeBack", "ChargeBack") + .WithMany("ChargeBackPays") + .HasForeignKey("ChargeBackId") + .IsRequired() + .HasConstraintName("fk_charge_back_pay_charge_back"); + + b.HasOne("Shentun.Peis.Models.PayMode", "PayMode") + .WithMany("ChargeBackPays") + .HasForeignKey("PayModeId") + .IsRequired() + .HasConstraintName("fk_charge_back_pay_pay_mode"); + + b.Navigation("ChargeBack"); + + b.Navigation("PayMode"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargePay", b => + { + b.HasOne("Shentun.Peis.Models.Charge", "Charge") + .WithMany("ChargePays") + .HasForeignKey("ChargeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_charge_payment_mode_charge"); + + b.HasOne("Shentun.Peis.Models.PayMode", "PayMode") + .WithMany("ChargePays") + .HasForeignKey("PayModeId") + .IsRequired() + .HasConstraintName("fk_charge_"); + + b.Navigation("Charge"); + + b.Navigation("PayMode"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargePriceItem", b => + { + b.HasOne("Shentun.Peis.Models.ChargeAsbitem", "ChargeAsbitem") + .WithMany("ChargePriceItems") + .HasForeignKey("ChargeAsbitemId") + .IsRequired() + .HasConstraintName("fk_charge_asbitem"); + + b.Navigation("ChargeAsbitem"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CommonChar", b => + { + b.HasOne("Shentun.Peis.Models.CommonCharType", "CommonCharType") + .WithMany("CommonChars") + .HasForeignKey("CommonCharTypeId") + .IsRequired() + .HasConstraintName("fk_common_char_common_char_type"); + + b.Navigation("CommonCharType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ContactMethod", b => + { + b.HasOne("Shentun.Peis.Models.ContactPerson", "ContactPerson") + .WithMany("ContactMethods") + .HasForeignKey("ContactPersonId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_contact_method_contact"); + + b.Navigation("ContactPerson"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ContactPerson", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrg", "CustomerOrg") + .WithMany("ContactPeople") + .HasForeignKey("CustomerOrgId") + .IsRequired() + .HasConstraintName("fk_contact_org"); + + b.Navigation("CustomerOrg"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CriticalValue", b => + { + b.HasOne("Shentun.Peis.Models.CriticalValueType", "CriticalValueType") + .WithMany("CriticalValues") + .HasForeignKey("CriticalValueTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_critica"); + + b.Navigation("CriticalValueType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgCharge", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgRegister", "CustomerOrgRegister") + .WithMany("CustomerOrgCharges") + .HasForeignKey("CustomerOrgRegisterId") + .IsRequired() + .HasConstraintName("fk_customer_org_charge_register"); + + b.Navigation("CustomerOrgRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargeBack", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgCharge", "CustomerOrgCharge") + .WithMany("CustomerOrgChargeBacks") + .HasForeignKey("CustomerOrgChargeId") + .IsRequired() + .HasConstraintName("fk_org_charge_back_org_charge"); + + b.Navigation("CustomerOrgCharge"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargeBackPay", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgChargeBack", "CustomerOrgChargeBack") + .WithMany("CustomerOrgChargeBackPays") + .HasForeignKey("CustomerOrgChargeBackId") + .IsRequired() + .HasConstraintName("fk_org_cha"); + + b.HasOne("Shentun.Peis.Models.PayMode", "PayMode") + .WithMany("CustomerOrgChargeBackPays") + .HasForeignKey("PayModeId") + .IsRequired() + .HasConstraintName("fk_org_charge_back_pay_pay_mode"); + + b.Navigation("CustomerOrgChargeBack"); + + b.Navigation("PayMode"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargePay", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgCharge", "CustomerOrgCharge") + .WithOne("CustomerOrgChargePay") + .HasForeignKey("Shentun.Peis.Models.CustomerOrgChargePay", "Id") + .IsRequired() + .HasConstraintName("fk_org_charge_pay_org_charge"); + + b.HasOne("Shentun.Peis.Models.PayMode", "PayMode") + .WithMany("CustomerOrgChargePays") + .HasForeignKey("PayModeId") + .HasConstraintName("fk_org_charge_pay_pay_mode"); + + b.Navigation("CustomerOrgCharge"); + + b.Navigation("PayMode"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgGroup", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgRegister", "CustomerOrgRegister") + .WithMany("CustomerOrgGroups") + .HasForeignKey("CustomerOrgRegisterId") + .IsRequired() + .HasConstraintName("fk_customer_org_group_register"); + + b.Navigation("CustomerOrgRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgGroupDetail", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithMany("CustomerOrgGroupDetails") + .HasForeignKey("AsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_org_group_detail_asbitem"); + + b.HasOne("Shentun.Peis.Models.CustomerOrgGroup", "CustomerOrgGroup") + .WithMany("CustomerOrgGroupDetails") + .HasForeignKey("CustomerOrgGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_org_group_detail_org_group"); + + b.Navigation("Asbitem"); + + b.Navigation("CustomerOrgGroup"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgRegister", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrg", "CustomerOrg") + .WithMany("CustomerOrgRegisters") + .HasForeignKey("CustomerOrgId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_org_medi_reference_org"); + + b.Navigation("CustomerOrg"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Diagnosis", b => + { + b.HasOne("Shentun.Peis.Models.DiagnosisLevel", "DiagnosisLevel") + .WithMany("Diagnoses") + .HasForeignKey("DiagnosisLevelId") + .IsRequired() + .HasConstraintName("fk_diagnosis_diagnosis_level"); + + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("Diagnoses") + .HasForeignKey("ItemTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_diagnosis_item_type"); + + b.Navigation("DiagnosisLevel"); + + b.Navigation("ItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisTemplateDetail", b => + { + b.HasOne("Shentun.Peis.Models.Diagnosis", "Diagnosis") + .WithMany("DiagnosisTemplateDetails") + .HasForeignKey("DiagnosisId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_diagnos"); + + b.HasOne("Shentun.Peis.Models.DiagnosisTemplate", "DiagnosisTemplate") + .WithMany("DiagnosisTemplateDetails") + .HasForeignKey("DiagnosisTemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_diagno2"); + + b.Navigation("Diagnosis"); + + b.Navigation("DiagnosisTemplate"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.HealthCertificate", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithOne("HealthCertificate") + .HasForeignKey("Shentun.Peis.Models.HealthCertificate", "Id") + .IsRequired() + .HasConstraintName("fk_health_"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Item", b => + { + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("Items") + .HasForeignKey("ItemTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_item_type"); + + b.Navigation("ItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultMatch", b => + { + b.HasOne("Shentun.Peis.Models.Diagnosis", "Diagnosis") + .WithMany("ItemResultMatches") + .HasForeignKey("DiagnosisId") + .IsRequired() + .HasConstraintName("fk_item_result_match_diagnosis"); + + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("ItemResultMatches") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_res_reference_item1"); + + b.Navigation("Diagnosis"); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultTemplate", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("ItemResultTemplates") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_res_reference_item"); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultTemplateType", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("ItemResultTemplateTypes") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_re"); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemTemplateDetail", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("ItemTemplateDetails") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_template_detail_item"); + + b.HasOne("Shentun.Peis.Models.ItemTemplate", "ItemTemplate") + .WithMany("ItemTemplateDetails") + .HasForeignKey("ItemTemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_te"); + + b.Navigation("Item"); + + b.Navigation("ItemTemplate"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemType", b => + { + b.HasOne("Shentun.Peis.Models.GuideType", "GuidType") + .WithMany("ItemTypes") + .HasForeignKey("GuidTypeId") + .IsRequired() + .HasConstraintName("fk_item_type_guide_type"); + + b.HasOne("Shentun.Peis.Models.MedicalReportType", "MedicalReportType") + .WithMany("ItemTypes") + .HasForeignKey("MedicalReportTypeId") + .IsRequired() + .HasConstraintName("fk_item_ty"); + + b.Navigation("GuidType"); + + b.Navigation("MedicalReportType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.LisRequest", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("LisRequests") + .HasForeignKey("PatientRegisterId") + .IsRequired() + .HasConstraintName("fk_lis_request_patient_register"); + + b.HasOne("Shentun.Peis.Models.SampleContainer", "SampleContainer") + .WithMany("LisRequests") + .HasForeignKey("SampleContainerId") + .IsRequired() + .HasConstraintName("fk_lis_request_sample_container"); + + b.HasOne("Shentun.Peis.Models.SampleType", "SampleType") + .WithMany("LisRequests") + .HasForeignKey("SampleTypeId") + .IsRequired() + .HasConstraintName("fk_lis_request_sample_type"); + + b.Navigation("PatientRegister"); + + b.Navigation("SampleContainer"); + + b.Navigation("SampleType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalConclusion", b => + { + b.HasOne("Shentun.Peis.Models.MedicalConclusionType", "MedicalConclusionType") + .WithMany("MedicalConclusions") + .HasForeignKey("MedicalConclusionTypeId") + .HasConstraintName("fk_medical"); + + b.Navigation("MedicalConclusionType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalPackageDetail", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithMany("MedicalPackageDetails") + .HasForeignKey("AsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_medical"); + + b.HasOne("Shentun.Peis.Models.MedicalPackage", "MedicalPackage") + .WithMany("MedicalPackageDetails") + .HasForeignKey("MedicalPackageId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_medica2"); + + b.Navigation("Asbitem"); + + b.Navigation("MedicalPackage"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.OrganizationUnitsCustomerOrg", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrg", "CustomerOrg") + .WithMany("OrganizationUnitsCustomerOrgs") + .HasForeignKey("CustomerOrgId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_medical_center_org_org"); + + b.HasOne("Shentun.Peis.Models.Department", "OrganizationUnit") + .WithMany("OrganizationUnitsCustomerOrgs") + .HasForeignKey("OrganizationUnitId") + .IsRequired() + .HasConstraintName("fk_medical"); + + b.Navigation("CustomerOrg"); + + b.Navigation("OrganizationUnit"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientOccupationalDisease", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithOne("PatientOccupationalDisease") + .HasForeignKey("Shentun.Peis.Models.PatientOccupationalDisease", "Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_patient"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientOccupationalHistory", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("PatientOccupationalHistories") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_occupat"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientPoison", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("PatientPoisons") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_patient"); + + b.HasOne("Shentun.Peis.Models.Poison", "Poison") + .WithMany("PatientPoisons") + .HasForeignKey("PoisonId") + .IsRequired() + .HasConstraintName("fk_patient_poison_poison"); + + b.Navigation("PatientRegister"); + + b.Navigation("Poison"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientRegister", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgRegister", "CustomerOrgRegister") + .WithMany("PatientRegisters") + .HasForeignKey("CustomerOrgRegisterId") + .IsRequired() + .HasConstraintName("fk_patient_register_org_register"); + + b.HasOne("Shentun.Peis.Models.MaritalStatus", "MaritalStatus") + .WithMany("PatientRegisters") + .HasForeignKey("MaritalStatusId") + .IsRequired() + .HasConstraintName("fk_patient_register_marital_status_id"); + + b.Navigation("CustomerOrgRegister"); + + b.Navigation("MaritalStatus"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientSymptom", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("PatientSymptoms") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_patient"); + + b.HasOne("Shentun.Peis.Models.Symptom", "Symptom") + .WithMany("PatientSymptoms") + .HasForeignKey("SymptomId") + .IsRequired() + .HasConstraintName("fk_patient_symptom_symptom"); + + b.Navigation("PatientRegister"); + + b.Navigation("Symptom"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PhoneFollow", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("PhoneFollows") + .HasForeignKey("PatientRegisterId") + .IsRequired() + .HasConstraintName("fk_phone_f"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Poison", b => + { + b.HasOne("Shentun.Peis.Models.PoisonType", "PoisonType") + .WithMany("Poisons") + .HasForeignKey("PoisonTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_poison_poison_type"); + + b.Navigation("PoisonType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PriceItem", b => + { + b.HasOne("Shentun.Peis.Models.InvoiceItemType", "InvoiceItemType") + .WithMany("PriceItems") + .HasForeignKey("InvoiceItemTypeId") + .IsRequired() + .HasConstraintName("fk_price_item_invoice_item_type"); + + b.Navigation("InvoiceItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.QueueRegister", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("QueueRegisters") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_queue_r"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ReferenceRange", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("ReferenceRanges") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_referenc_reference_item"); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterAsbitem", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithMany("RegisterAsbitems") + .HasForeignKey("AsbitemId") + .IsRequired() + .HasConstraintName("fk_register_reference_asbitem"); + + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("RegisterAsbitems") + .HasForeignKey("PatientRegisterId") + .IsRequired() + .HasConstraintName("fk_register_reference_patient_"); + + b.HasOne("Shentun.Peis.Models.RegisterCheck", "RegisterCheck") + .WithMany("RegisterAsbitems") + .HasForeignKey("RegisterCheckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_registe"); + + b.Navigation("Asbitem"); + + b.Navigation("PatientRegister"); + + b.Navigation("RegisterCheck"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckItem", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("RegisterCheckItems") + .HasForeignKey("ItemId") + .IsRequired() + .HasConstraintName("fk_register_reference_item"); + + b.HasOne("Shentun.Peis.Models.RegisterCheck", "RegisterCheck") + .WithMany("RegisterCheckItems") + .HasForeignKey("RegisterCheckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_register_item_register_check"); + + b.HasOne("Shentun.Peis.Models.ResultStatus", "ResultStatus") + .WithMany("RegisterCheckItems") + .HasForeignKey("ResultStatusId") + .HasConstraintName("fk_register_item_result_status"); + + b.Navigation("Item"); + + b.Navigation("RegisterCheck"); + + b.Navigation("ResultStatus"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckPicture", b => + { + b.HasOne("Shentun.Peis.Models.RegisterCheck", "RegisterCheck") + .WithMany("RegisterCheckPictures") + .HasForeignKey("RegisterCheckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_check_picture_register_check"); + + b.Navigation("RegisterCheck"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckSuggestion", b => + { + b.HasOne("Shentun.Peis.Models.RegisterCheck", "RegisterCheck") + .WithMany("RegisterCheckSuggestions") + .HasForeignKey("RegisterCheckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_registe"); + + b.Navigation("RegisterCheck"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckSummary", b => + { + b.HasOne("Shentun.Peis.Models.RegisterCheck", "RegisterCheck") + .WithMany("RegisterCheckSummaries") + .HasForeignKey("RegisterCheckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_registe"); + + b.Navigation("RegisterCheck"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Room", b => + { + b.HasOne("Shentun.Peis.Models.Department", "Department") + .WithMany("Rooms") + .HasForeignKey("DepartmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_room_department"); + + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("Rooms") + .HasForeignKey("ItemTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_room_item_type"); + + b.Navigation("Department"); + + b.Navigation("ItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleGroup", b => + { + b.HasOne("Shentun.Peis.Models.SampleContainer", "SampleContainer") + .WithMany("SampleGroups") + .HasForeignKey("SampleContainerId") + .IsRequired() + .HasConstraintName("fk_sample_"); + + b.HasOne("Shentun.Peis.Models.SampleType", "SampleType") + .WithMany("SampleGroups") + .HasForeignKey("SampleTypeId") + .IsRequired() + .HasConstraintName("fk_sample_group_sample_type"); + + b.Navigation("SampleContainer"); + + b.Navigation("SampleType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleGroupDetail", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithOne("SampleGroupDetail") + .HasForeignKey("Shentun.Peis.Models.SampleGroupDetail", "AsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sample_group_detail_asbitem"); + + b.HasOne("Shentun.Peis.Models.SampleGroup", "SampleGroup") + .WithMany("SampleGroupDetails") + .HasForeignKey("SampleGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sample_"); + + b.Navigation("Asbitem"); + + b.Navigation("SampleGroup"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ServiceTrade", b => + { + b.HasOne("Shentun.Peis.Models.Department", "Department") + .WithMany("ServiceTrades") + .HasForeignKey("DepartmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_service_trades_department"); + + b.Navigation("Department"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SexHormoneReferenceRange", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("SexHormoneReferenceRanges") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sex_hor"); + + b.HasOne("Shentun.Peis.Models.SexHormoneTerm", "SexHormoneTerm") + .WithMany("SexHormoneReferenceRanges") + .HasForeignKey("SexHormoneTermId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sex_ho2"); + + b.Navigation("Item"); + + b.Navigation("SexHormoneTerm"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Suggestion", b => + { + b.HasOne("Shentun.Peis.Models.Diagnosis", "Diagnosis") + .WithMany("Suggestions") + .HasForeignKey("DiagnosisId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_suggestion_diagnosis"); + + b.Navigation("Diagnosis"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumDiagnosis", b => + { + b.HasOne("Shentun.Peis.Models.Diagnosis", "Diagnosis") + .WithMany("SumDiagnoses") + .HasForeignKey("DiagnosisId") + .IsRequired() + .HasConstraintName("fk_sum_diagnosis_diagnosis"); + + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("SumDiagnoses") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sum_dia"); + + b.Navigation("Diagnosis"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSuggestionContent", b => + { + b.HasOne("Shentun.Peis.Models.SumSuggestionHeader", "SumSuggestionHeader") + .WithMany("SumSuggestionContents") + .HasForeignKey("SumSuggestionHeaderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sum_sug"); + + b.Navigation("SumSuggestionHeader"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSuggestionHeader", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("SumSuggestionHeaders") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sum_sug"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSummaryContent", b => + { + b.HasOne("Shentun.Peis.Models.SumSummaryHeader", "SumSummaryHeader") + .WithMany("SumSummaryContents") + .HasForeignKey("SumSummaryHeaderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sum_sum"); + + b.Navigation("SumSummaryHeader"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSummaryHeader", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("SumSummaryHeaders") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sum_sum"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParm", b => + { + b.HasOne("Shentun.Peis.Models.SysParmType", "SysParmType") + .WithMany("SysParms") + .HasForeignKey("SysParmTypeId") + .HasConstraintName("fk_sys_parm_sys_parm_type"); + + b.Navigation("SysParmType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmValue", b => + { + b.HasOne("Shentun.Peis.Models.SysParm", "SysParm") + .WithMany("SysParmValues") + .HasForeignKey("SysParmId") + .IsRequired() + .HasConstraintName("fk_sys_parm_value_sys_parm"); + + b.Navigation("SysParm"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmValueOption", b => + { + b.HasOne("Shentun.Peis.Models.SysParm", "SysParm") + .WithMany("SysParmValueOptions") + .HasForeignKey("SysParmId") + .IsRequired() + .HasConstraintName("fk_sys_par"); + + b.Navigation("SysParm"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.User", b => + { + b.HasOne("Shentun.Peis.Models.Department", "Department") + .WithMany("Users") + .HasForeignKey("DepartmentId") + .IsRequired() + .HasConstraintName("fk_user_department"); + + b.Navigation("Department"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserDepartment", b => + { + b.HasOne("Shentun.Peis.Models.Department", "Department") + .WithMany("UserDepartments") + .HasForeignKey("DepartmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_op"); + + b.HasOne("Shentun.Peis.Models.User", "User") + .WithMany("UserDepartments") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_o2"); + + b.Navigation("Department"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserGrouping", b => + { + b.HasOne("Shentun.Peis.Models.Grouping", "Grouping") + .WithMany("UserGroupings") + .HasForeignKey("GroupingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_grouping_grouping"); + + b.HasOne("Shentun.Peis.Models.User", "User") + .WithMany("UserGroupings") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_grouping_users"); + + b.Navigation("Grouping"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserItemType", b => + { + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("UserItemTypes") + .HasForeignKey("ItemTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_item_type_item_type"); + + b.HasOne("Shentun.Peis.Models.User", "User") + .WithMany("UserItemTypes") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_item_type_users"); + + b.Navigation("ItemType"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("Actions") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("EntityChanges") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.EntityChange", null) + .WithMany("PropertyChanges") + .HasForeignKey("EntityChangeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany("Claims") + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Claims") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Logins") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("OrganizationUnits") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Roles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Tokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("ParentId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany("Roles") + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + + b.HasOne("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", null) + .WithMany() + .HasForeignKey("AuthorizationId"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.HasOne("Volo.Abp.TenantManagement.Tenant", null) + .WithMany("ConnectionStrings") + .HasForeignKey("TenantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Shentun.Peis.Books.HelloType", b => + { + b.Navigation("HelloAs"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.TestA", b => + { + b.Navigation("TestBs"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Asbitem", b => + { + b.Navigation("AsbitemDetails"); + + b.Navigation("ChargeAsbitems"); + + b.Navigation("CustomerOrgGroupDetails"); + + b.Navigation("MedicalPackageDetails"); + + b.Navigation("RegisterAsbitems"); + + b.Navigation("SampleGroupDetail"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultTemplate", b => + { + b.Navigation("BigtextResultConclusions"); + + b.Navigation("BigtextResultDescriptions"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultType", b => + { + b.Navigation("BigtextResultTemplates"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardRegister", b => + { + b.Navigation("CardBills"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardType", b => + { + b.Navigation("CardRegisters"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Charge", b => + { + b.Navigation("ChargeAsbitems"); + + b.Navigation("ChargeBacks"); + + b.Navigation("ChargePays"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeAsbitem", b => + { + b.Navigation("ChargePriceItems"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeBack", b => + { + b.Navigation("ChargeBackPays"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CommonCharType", b => + { + b.Navigation("CommonChars"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ContactPerson", b => + { + b.Navigation("ContactMethods"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CriticalValueType", b => + { + b.Navigation("CriticalValues"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrg", b => + { + b.Navigation("ContactPeople"); + + b.Navigation("CustomerOrgRegisters"); + + b.Navigation("OrganizationUnitsCustomerOrgs"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgCharge", b => + { + b.Navigation("CustomerOrgChargeBacks"); + + b.Navigation("CustomerOrgChargePay"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargeBack", b => + { + b.Navigation("CustomerOrgChargeBackPays"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgGroup", b => + { + b.Navigation("CustomerOrgGroupDetails"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgRegister", b => + { + b.Navigation("CustomerOrgCharges"); + + b.Navigation("CustomerOrgGroups"); + + b.Navigation("PatientRegisters"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Department", b => + { + b.Navigation("CardRegisters"); + + b.Navigation("OrganizationUnitsCustomerOrgs"); + + b.Navigation("Rooms"); + + b.Navigation("ServiceTrades"); + + b.Navigation("UserDepartments"); + + b.Navigation("Users"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Diagnosis", b => + { + b.Navigation("DiagnosisTemplateDetails"); + + b.Navigation("ItemResultMatches"); + + b.Navigation("Suggestions"); + + b.Navigation("SumDiagnoses"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisLevel", b => + { + b.Navigation("Diagnoses"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisTemplate", b => + { + b.Navigation("DiagnosisTemplateDetails"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Grouping", b => + { + b.Navigation("UserGroupings"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.GuideType", b => + { + b.Navigation("ItemTypes"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.InvoiceItemType", b => + { + b.Navigation("Asbitems"); + + b.Navigation("PriceItems"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Item", b => + { + b.Navigation("AsbitemDetails"); + + b.Navigation("ItemResultMatches"); + + b.Navigation("ItemResultTemplateTypes"); + + b.Navigation("ItemResultTemplates"); + + b.Navigation("ItemTemplateDetails"); + + b.Navigation("ReferenceRanges"); + + b.Navigation("RegisterCheckItems"); + + b.Navigation("SexHormoneReferenceRanges"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemTemplate", b => + { + b.Navigation("ItemTemplateDetails"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemType", b => + { + b.Navigation("Asbitems"); + + b.Navigation("BigtextResultTypes"); + + b.Navigation("Diagnoses"); + + b.Navigation("Items"); + + b.Navigation("Rooms"); + + b.Navigation("UserItemTypes"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MaritalStatus", b => + { + b.Navigation("PatientRegisters"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalConclusionType", b => + { + b.Navigation("MedicalConclusions"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalPackage", b => + { + b.Navigation("MedicalPackageDetails"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalReportType", b => + { + b.Navigation("ItemTypes"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientRegister", b => + { + b.Navigation("Charges"); + + b.Navigation("HealthCertificate"); + + b.Navigation("LisRequests"); + + b.Navigation("PatientOccupationalDisease"); + + b.Navigation("PatientOccupationalHistories"); + + b.Navigation("PatientPoisons"); + + b.Navigation("PatientSymptoms"); + + b.Navigation("PhoneFollows"); + + b.Navigation("QueueRegisters"); + + b.Navigation("RegisterAsbitems"); + + b.Navigation("SumDiagnoses"); + + b.Navigation("SumSuggestionHeaders"); + + b.Navigation("SumSummaryHeaders"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PayMode", b => + { + b.Navigation("CardBills"); + + b.Navigation("ChargeBackPays"); + + b.Navigation("ChargePays"); + + b.Navigation("CustomerOrgChargeBackPays"); + + b.Navigation("CustomerOrgChargePays"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Poison", b => + { + b.Navigation("PatientPoisons"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PoisonType", b => + { + b.Navigation("Poisons"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheck", b => + { + b.Navigation("RegisterAsbitems"); + + b.Navigation("RegisterCheckItems"); + + b.Navigation("RegisterCheckPictures"); + + b.Navigation("RegisterCheckSuggestions"); + + b.Navigation("RegisterCheckSummaries"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ResultStatus", b => + { + b.Navigation("RegisterCheckItems"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleContainer", b => + { + b.Navigation("LisRequests"); + + b.Navigation("SampleGroups"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleGroup", b => + { + b.Navigation("SampleGroupDetails"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleType", b => + { + b.Navigation("LisRequests"); + + b.Navigation("SampleGroups"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SexHormoneTerm", b => + { + b.Navigation("SexHormoneReferenceRanges"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSuggestionHeader", b => + { + b.Navigation("SumSuggestionContents"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSummaryHeader", b => + { + b.Navigation("SumSummaryContents"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Symptom", b => + { + b.Navigation("PatientSymptoms"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParm", b => + { + b.Navigation("SysParmValueOptions"); + + b.Navigation("SysParmValues"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmType", b => + { + b.Navigation("SysParms"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.User", b => + { + b.Navigation("UserDepartments"); + + b.Navigation("UserGroupings"); + + b.Navigation("UserItemTypes"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Navigation("Actions"); + + b.Navigation("EntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Navigation("PropertyChanges"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Navigation("Claims"); + + b.Navigation("Logins"); + + b.Navigation("OrganizationUnits"); + + b.Navigation("Roles"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Navigation("Roles"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230625012410_i062502.cs b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230625012410_i062502.cs new file mode 100644 index 00000000..69b54f0c --- /dev/null +++ b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230625012410_i062502.cs @@ -0,0 +1,55 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Shentun.Peis.Migrations +{ + public partial class i062502 : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "PatientNo", + table: "patient", + newName: "patient_no"); + + migrationBuilder.RenameIndex( + name: "IX_patient_PatientNo", + table: "patient", + newName: "IX_patient_patient_no"); + + migrationBuilder.AlterColumn( + name: "patient_no", + table: "patient", + type: "character varying(30)", + maxLength: 30, + nullable: true, + oldClrType: typeof(string), + oldType: "text", + oldNullable: true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameColumn( + name: "patient_no", + table: "patient", + newName: "PatientNo"); + + migrationBuilder.RenameIndex( + name: "IX_patient_patient_no", + table: "patient", + newName: "IX_patient_PatientNo"); + + migrationBuilder.AlterColumn( + name: "PatientNo", + table: "patient", + type: "text", + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(30)", + oldMaxLength: 30, + oldNullable: true); + } + } +} diff --git a/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230625012649_i062503.Designer.cs b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230625012649_i062503.Designer.cs new file mode 100644 index 00000000..8e9bb5e4 --- /dev/null +++ b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230625012649_i062503.Designer.cs @@ -0,0 +1,10690 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; +using Shentun.Peis.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Shentun.Peis.Migrations +{ + [DbContext(typeof(PeisDbContext))] + [Migration("20230625012649_i062503")] + partial class i062503 + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.PostgreSql) + .HasAnnotation("ProductVersion", "6.0.5") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("AsbitemRoom", b => + { + b.Property("AsbitemId") + .HasColumnType("uuid"); + + b.Property("RoomId") + .HasColumnType("uuid"); + + b.HasKey("AsbitemId", "RoomId"); + + b.ToTable("AsbitemRoom"); + }); + + modelBuilder.Entity("ChildDiagnosis", b => + { + b.Property("ParentDiagnosisId") + .HasMaxLength(8) + .HasColumnType("uuid") + .HasColumnName("parent_diagnosis_id") + .IsFixedLength(); + + b.Property("DiagnosisId") + .HasMaxLength(8) + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength(); + + b.HasKey("ParentDiagnosisId", "DiagnosisId") + .HasName("pk_child_diagnosis"); + + b.HasIndex("DiagnosisId"); + + b.ToTable("child_diagnosis", (string)null); + + b.HasComment("子诊断"); + }); + + modelBuilder.Entity("DiagnosisDiagnosis", b => + { + b.Property("DiagnosisId") + .HasColumnType("uuid"); + + b.Property("ParentDiagnosisId") + .HasColumnType("uuid"); + + b.HasKey("DiagnosisId", "ParentDiagnosisId"); + + b.ToTable("DiagnosisDiagnosis"); + }); + + modelBuilder.Entity("RoomAsbitem", b => + { + b.Property("RoomId") + .HasMaxLength(5) + .HasColumnType("uuid") + .HasColumnName("room_id") + .IsFixedLength(); + + b.Property("AsbitemId") + .HasMaxLength(6) + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength(); + + b.HasKey("RoomId", "AsbitemId") + .HasName("pk_room_asbitem"); + + b.HasIndex("AsbitemId"); + + b.ToTable("room_asbitem", (string)null); + + b.HasComment("房间包含组合项目设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.HelloA", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ADesc") + .HasColumnType("text") + .HasColumnName("a_desc"); + + b.Property("AName") + .ValueGeneratedOnAdd() + .HasColumnType("text") + .HasDefaultValue("默认值") + .HasColumnName("a_name"); + + b.Property("AddTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("add_time") + .HasDefaultValueSql("now()"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("HelloTypeId") + .HasColumnType("uuid") + .HasColumnName("hello_type_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("HelloTypeId"); + + b.ToTable("hello_a"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.HelloType", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("TypeName") + .HasColumnType("text") + .HasColumnName("type_name") + .HasComment("类型名称"); + + b.HasKey("Id"); + + b.ToTable("hello_type"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.Student", b => + { + b.Property("Sid") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("sid"); + + b.Property("Cid") + .HasColumnType("text"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasColumnType("text"); + + b.Property("Uid") + .HasColumnType("uuid"); + + b.HasKey("Sid"); + + b.ToTable("student"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.TestA", b => + { + b.Property("AId") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("AName") + .HasColumnType("text"); + + b.HasKey("AId"); + + b.ToTable("testa"); + + b.HasComment("组合项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.TestB", b => + { + b.Property("BId") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("AId") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("AName") + .HasColumnType("text"); + + b.Property("TestAsAId") + .HasColumnType("uuid"); + + b.HasKey("BId"); + + b.HasIndex("TestAsAId"); + + b.ToTable("testb"); + + b.HasComment("组合项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Asbitem", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("ClinicalMeaning") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("clinical_meaning"); + + b.Property("CreationTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DefaultResult") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("default_result"); + + b.Property("DeviceTypeId") + .HasColumnType("uuid") + .HasColumnName("device_type_id") + .IsFixedLength(); + + b.Property("DiagnosisFunction") + .HasMaxLength(1000) + .HasColumnType("character varying(1000)") + .HasColumnName("diagnosis_function"); + + b.Property("DisplayName") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar"); + + b.Property("InvoiceItemTypeId") + .HasColumnType("uuid") + .HasColumnName("invoice_item_type_id") + .IsFixedLength(); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active"); + + b.Property("IsBeforeEat") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_before_eat"); + + b.Property("IsCheck") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_check"); + + b.Property("IsContinueProcess") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_continue_process"); + + b.Property("IsDiagnosisFunction") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_diagnosis_function"); + + b.Property("IsItemResultMerger") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_item_result_merger"); + + b.Property("IsPictureRotate") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_picture_rotate"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Price") + .HasPrecision(8, 2) + .HasColumnType("numeric(8,2)") + .HasColumnName("price"); + + b.Property("QueueTime") + .HasPrecision(3, 1) + .HasColumnType("numeric(3,1)") + .HasColumnName("queue_time"); + + b.Property("ShortName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("short_name"); + + b.Property("SimpleCode") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("InvoiceItemTypeId"); + + b.HasIndex("ItemTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_asbitem") + .IsUnique(); + + b.ToTable("asbitem"); + + b.HasComment("组合项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.AsbitemDetail", b => + { + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength(); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength(); + + b.HasKey("AsbitemId", "ItemId") + .HasName("pk_department_asbitem_detail"); + + b.HasIndex("ItemId"); + + b.ToTable("asbitem_detail"); + + b.HasComment("组合项目包含项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.AsbitemGuide", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id") + .IsFixedLength(); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength(); + + b.Property("ForSexId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id"); + + b.Property("Guide") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("guide"); + + b.HasKey("OrganizationUnitId", "AsbitemId", "ForSexId") + .HasName("pk_department_asbitem_guide"); + + b.ToTable("asbitem_guide"); + + b.HasComment("体检中心组和项目指引内容"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.AsbitemPriceItem", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("Amount") + .HasColumnType("smallint") + .HasColumnName("amount"); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PriceItemId") + .HasColumnType("uuid") + .HasColumnName("price_item_id") + .IsFixedLength(); + + b.HasKey("Id"); + + b.ToTable("asbitem_price_item"); + + b.HasComment("组和项目包含价表项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultConclusion", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("BigtextResultTemplateId") + .HasColumnType("uuid") + .HasColumnName("bigtext_result_template_id") + .IsFixedLength(); + + b.Property("Conclusion") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("conclusion"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("BigtextResultTemplateId"); + + b.ToTable("bigtext_result_conclusion"); + + b.HasComment("大文本结果结论"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultDescription", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("BigtextResultTemplateId") + .HasColumnType("uuid") + .HasColumnName("bigtext_result_template_id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("description"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("BigtextResultTemplateId"); + + b.ToTable("bigtext_result_description"); + + b.HasComment("大文本结果描述"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("BigtextResultTypeId") + .HasColumnType("uuid") + .HasColumnName("bigtext_result_type_id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("BigtextResultTypeId"); + + b.ToTable("bigtext_result_template"); + + b.HasComment("大文本结果模板"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength(); + + b.Property("PathCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("path_code"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("ItemTypeId"); + + b.ToTable("bigtext_result_type"); + + b.HasComment("大文本结果类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BirthPlace", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CountryCode") + .HasMaxLength(6) + .HasColumnType("character varying(6)") + .HasColumnName("country_code"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_birth_place") + .IsUnique(); + + b.ToTable("birth_place"); + + b.HasComment("出生地"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardBill", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("编号"); + + b.Property("BillFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("bill_flag") + .HasDefaultValueSql("'0'::bpchar") + .HasComment("记账标志"); + + b.Property("BillMoney") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("bill_money") + .HasComment("记账金额"); + + b.Property("CardRegisterId") + .HasColumnType("uuid") + .HasColumnName("card_register_id") + .HasComment("卡登记编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PayModeId") + .ValueGeneratedOnAdd() + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("pay_mode_id") + .HasDefaultValueSql("'1'::bpchar") + .IsFixedLength() + .HasComment("支付方式"); + + b.HasKey("Id"); + + b.HasIndex("CardRegisterId"); + + b.HasIndex("PayModeId"); + + b.ToTable("card_bill"); + + b.HasComment("卡记账记录"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardRegister", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("编号"); + + b.Property("CardFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("card_flag") + .HasDefaultValueSql("0") + .HasComment("使用标志"); + + b.Property("CardNo") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("card_no") + .HasComment("卡号"); + + b.Property("CardPassword") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("card_password"); + + b.Property("CardTypeId") + .HasColumnType("uuid") + .HasColumnName("card_type_id") + .IsFixedLength() + .HasComment("卡类型"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("customer_name") + .HasComment("领用者"); + + b.Property("Discount") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("discount") + .HasDefaultValueSql("100") + .HasComment("折扣"); + + b.Property("ExpiryDate") + .HasColumnType("date") + .HasColumnName("expiry_date") + .HasComment("有效期"); + + b.Property("IdNo") + .HasMaxLength(18) + .HasColumnType("character varying(18)") + .HasColumnName("id_no") + .HasComment("身份证号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MobileTelephone") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("mobile_telephone") + .HasComment("手机"); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id") + .IsFixedLength(); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("Telephone") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("telephone") + .HasComment("电话"); + + b.HasKey("Id"); + + b.HasIndex("CardTypeId"); + + b.HasIndex("OrganizationUnitId"); + + b.HasIndex(new[] { "CardNo", "CardFlag" }, "ix_card_register") + .IsUnique(); + + b.ToTable("card_register"); + + b.HasComment("会员卡登记"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("CardModeId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("card_mode_id") + .HasDefaultValueSql("0") + .HasComment("卡模式"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("Discount") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("discount") + .HasDefaultValueSql("100") + .HasComment("折扣"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("ExpiryDay") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("expiry_day") + .HasDefaultValueSql("3650") + .HasComment("有效期"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark") + .HasComment("备注"); + + b.HasKey("Id"); + + b.ToTable("card_type"); + + b.HasComment("会员卡类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Charge", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("收据号"); + + b.Property("ChargeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("charge_flag") + .HasDefaultValueSql("0"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("InvoiceNo") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("invoice_no"); + + b.Property("InvoiceOrgName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("invoice_org_name"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("登记流水号"); + + b.Property("SettleAccountId") + .HasColumnType("uuid") + .HasColumnName("settle_account_id"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "PatientRegisterId" }, "fki_fk_patient_register_charge"); + + b.HasIndex(new[] { "PatientRegisterId" }, "ix_charge"); + + b.ToTable("charge"); + + b.HasComment("收费主档"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeAsbitem", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Amount") + .HasColumnType("smallint") + .HasColumnName("amount"); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength() + .HasComment("组合项目"); + + b.Property("ChargeId") + .HasColumnType("uuid") + .HasColumnName("charge_id") + .HasComment("收据号"); + + b.Property("ChargePrice") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_price") + .HasComment("价格"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("RegisterAsbitemId") + .HasColumnType("uuid") + .HasColumnName("register_asbitem_id"); + + b.HasKey("Id"); + + b.HasIndex("AsbitemId"); + + b.HasIndex("ChargeId"); + + b.ToTable("charge_asbitem"); + + b.HasComment("收费包含组合项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeBack", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("退费编号"); + + b.Property("ChargeId") + .HasColumnType("uuid") + .HasColumnName("charge_id") + .HasComment("收据号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SettleAccountId") + .HasColumnType("uuid") + .HasColumnName("settle_account_id"); + + b.HasKey("Id"); + + b.HasIndex("ChargeId"); + + b.ToTable("charge_back"); + + b.HasComment("退费主档"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeBackPay", b => + { + b.Property("ChargeBackId") + .HasColumnType("uuid") + .HasColumnName("charge_back_id"); + + b.Property("PayModeId") + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("pay_mode_id") + .IsFixedLength(); + + b.Property("BackMoeny") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("back_moeny"); + + b.HasKey("ChargeBackId", "PayModeId") + .HasName("pk_department_charge_back_pay"); + + b.HasIndex("PayModeId"); + + b.ToTable("charge_back_pay"); + + b.HasComment("退费支付方式"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargePay", b => + { + b.Property("ChargeId") + .HasColumnType("uuid") + .HasColumnName("charge_id") + .HasComment("收据号"); + + b.Property("PayModeId") + .ValueGeneratedOnAdd() + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("pay_mode_id") + .HasDefaultValueSql("'1'::bpchar") + .IsFixedLength() + .HasComment("支付方式"); + + b.Property("CardBillId") + .HasColumnType("uuid") + .HasColumnName("card_bill_id"); + + b.Property("ChargeMoney") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_money") + .HasComment("金额"); + + b.HasKey("ChargeId", "PayModeId") + .HasName("pk_department_charge_pay"); + + b.HasIndex("PayModeId"); + + b.ToTable("charge_pay"); + + b.HasComment("收费支付方式"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargePriceItem", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Amount") + .HasColumnType("smallint") + .HasColumnName("amount"); + + b.Property("ChargeAsbitemId") + .HasColumnType("uuid") + .HasColumnName("charge_asbitem_id"); + + b.Property("ChargePrice") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_price"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PriceItemId") + .HasColumnType("uuid") + .HasColumnName("price_item_id"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "ChargeAsbitemId" }, "fki_fk_charge_asbitem"); + + b.HasIndex(new[] { "ChargeAsbitemId", "PriceItemId" }, "ix_charge_price_item"); + + b.ToTable("charge_price_item"); + + b.HasComment("收费价表项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CommonChar", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CommonCharTypeId") + .HasColumnType("uuid") + .HasColumnName("common_char_type_id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(1) + .HasColumnType("character varying(1)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(1) + .HasColumnType("character varying(1)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("CommonCharTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_common_char") + .IsUnique(); + + b.ToTable("common_char"); + + b.HasComment("常用字符"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CommonCharType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_common_char_type") + .IsUnique(); + + b.ToTable("common_char_type"); + + b.HasComment("常用字符类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ContactMethod", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ContactMethodType") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("contact_method_type") + .HasDefaultValueSql("'M'::bpchar"); + + b.Property("ContactMethodValue") + .HasMaxLength(15) + .HasColumnType("character varying(15)") + .HasColumnName("contact_method_value"); + + b.Property("ContactPersonId") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("ContactPersonId"); + + b.ToTable("contact_method"); + + b.HasComment("联系方式"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ContactPerson", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgId") + .HasColumnType("uuid") + .HasColumnName("customer_org_id") + .IsFixedLength(); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("Title") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("title"); + + b.HasKey("Id"); + + b.HasIndex("CustomerOrgId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_contact"); + + b.HasIndex(new[] { "SimpleCode" }, "ix_contact_simple_code"); + + b.ToTable("contact_person"); + + b.HasComment("联系人"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CriticalValue", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CriticalValueTypeId") + .HasColumnType("uuid") + .HasColumnName("critical_value_type_id") + .IsFixedLength(); + + b.Property("DisplayName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("CriticalValueTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_critical_value") + .IsUnique(); + + b.ToTable("critical_value"); + + b.HasComment("危急值关键字设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CriticalValueType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength(); + + b.Property("PathCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("path_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_critical_value_type") + .IsUnique(); + + b.ToTable("critical_value_type"); + + b.HasComment("危急值类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrg", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("单位ID"); + + b.Property("Accounts") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("accounts") + .HasComment("银行帐号"); + + b.Property("Address") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("address") + .HasComment("联系地址"); + + b.Property("Bank") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("bank") + .HasComment("业务银行"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("单位名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("Fax") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("fax") + .HasComment("传真"); + + b.Property("InvoiceName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("invoice_name"); + + b.Property("IsLock") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_lock"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OrgTypeId") + .HasColumnType("uuid") + .HasColumnName("org_type_id") + .IsFixedLength() + .HasComment("单位性质"); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength(); + + b.Property("PathCode") + .HasMaxLength(60) + .HasColumnType("character varying(60)") + .HasColumnName("path_code"); + + b.Property("PostalCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("postal_code") + .HasComment("邮政编码"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("ShortName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("short_name"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code") + .HasComment("拼音简码"); + + b.Property("StatusFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("status_flag") + .HasDefaultValueSql("0"); + + b.Property("Telephone") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("telephone") + .HasComment("联系电话"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "OrganizationUnitId" }, "fki_fk_customer_org_organization_units"); + + b.HasIndex(new[] { "ParentId", "DisplayName" }, "ix_org") + .IsUnique(); + + b.ToTable("customer_org"); + + b.HasComment("团检单位设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgCharge", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ChargeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("charge_flag"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgRegisterId") + .HasColumnType("uuid") + .HasColumnName("customer_org_register_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Payer") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("payer"); + + b.Property("SettleAccountId") + .HasColumnType("uuid") + .HasColumnName("settle_account_id"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "CustomerOrgRegisterId" }, "fki_fk_customer_org_charge_register"); + + b.ToTable("customer_org_charge"); + + b.HasComment("团检单位收费"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargeBack", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgChargeId") + .HasColumnType("uuid") + .HasColumnName("customer_org_charge_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SettleAccountId") + .HasColumnType("uuid") + .HasColumnName("settle_account_id"); + + b.HasKey("Id"); + + b.HasIndex("CustomerOrgChargeId"); + + b.ToTable("customer_org_charge_back"); + + b.HasComment("团检单位退费"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargeBackPay", b => + { + b.Property("CustomerOrgChargeBackId") + .HasColumnType("uuid") + .HasColumnName("customer_org_charge_back_id"); + + b.Property("PayModeId") + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("pay_mode_id") + .IsFixedLength(); + + b.Property("BackMoeny") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("back_moeny"); + + b.HasKey("CustomerOrgChargeBackId", "PayModeId") + .HasName("pk_org_charge_back_pay"); + + b.HasIndex("PayModeId"); + + b.ToTable("customer_org_charge_back_pay"); + + b.HasComment("团结退费支付方式"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargePay", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ChargeMoney") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_money"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PayModeId") + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("pay_mode_id") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("PayModeId"); + + b.ToTable("customer_org_charge_pay"); + + b.HasComment("团检收费支付方式"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgGroup", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("分组编号"); + + b.Property("AgeLowerLimit") + .HasColumnType("smallint") + .HasColumnName("age_lower_limit") + .HasComment("适用年龄下限"); + + b.Property("AgeUpperLimit") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasColumnName("age_upper_limit") + .HasDefaultValueSql("120") + .HasComment("适用年龄上限"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgRegisterId") + .HasColumnType("uuid") + .HasColumnName("customer_org_register_id"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("分组名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar") + .HasComment("适用性别"); + + b.Property("JobPost") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("job_post") + .HasComment("适用职务"); + + b.Property("JobTitle") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("job_title") + .HasComment("适用职称"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MaritalStatusId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("marital_status_id") + .HasComment("适用婚姻状况"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price") + .HasComment("价格"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark") + .HasComment("备注"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "CustomerOrgRegisterId" }, "fki_fk_customer_org_group_register"); + + b.ToTable("customer_org_group"); + + b.HasComment("团体分组主档"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgGroupDetail", b => + { + b.Property("CustomerOrgGroupId") + .HasColumnType("uuid") + .HasColumnName("customer_org_group_id") + .IsFixedLength(); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength(); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price"); + + b.HasKey("CustomerOrgGroupId", "AsbitemId") + .HasName("pk_org_group_detail"); + + b.HasIndex("AsbitemId"); + + b.ToTable("customer_org_group_detail"); + + b.HasComment("团检分组包含组合项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgRegister", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("BeginTime") + .ValueGeneratedOnAdd() + .HasColumnType("date") + .HasColumnName("begin_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)") + .HasComment("开始日期"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgId") + .HasColumnType("uuid") + .HasColumnName("customer_org_id") + .IsFixedLength() + .HasComment("单位编号"); + + b.Property("EndTime") + .HasColumnType("date") + .HasColumnName("end_time") + .HasComment("结束日期"); + + b.Property("IsComplete") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_complete") + .HasComment("完成标志"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MedicalTimes") + .HasColumnType("smallint") + .HasColumnName("medical_times") + .HasComment("单位体检次数"); + + b.Property("RegisterName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("register_name"); + + b.Property("RegisterNo") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("register_no"); + + b.HasKey("Id"); + + b.HasIndex("CustomerOrgId"); + + b.ToTable("customer_org_register"); + + b.HasComment("团检体检登记"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_org_type") + .IsUnique(); + + b.ToTable("customer_org_type"); + + b.HasComment("团体类型设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Department", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CodePrefix") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("code_prefix"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DepartmentTypeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("department_type_flag"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasMaxLength(4) + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength(); + + b.Property("PathCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("path_code"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName", "ParentId" }, "ix_department") + .IsUnique(); + + b.ToTable("department"); + + b.HasComment("部门"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DeviceType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("仪器类别编号"); + + b.Property("CheckTypeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("check_type_flag"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("仪器类别名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.ToTable("device_type"); + + b.HasComment("仪器类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Diagnosis", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DiagnosisLevelId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_level_id"); + + b.Property("DisplayName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar"); + + b.Property("IsIll") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_ill"); + + b.Property("IsSummaryTemplate") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_summary_template"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("simple_code"); + + b.Property("SuggestionName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("suggestion_name"); + + b.HasKey("Id"); + + b.HasIndex("DiagnosisLevelId"); + + b.HasIndex("ItemTypeId"); + + b.ToTable("diagnosis"); + + b.HasComment("诊断设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisLevel", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.ToTable("diagnosis_level"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisPostfix", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_diagnosis_postfix") + .IsUnique(); + + b.ToTable("diagnosis_postfix"); + + b.HasComment("诊断后缀设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_diagnosis_template") + .IsUnique(); + + b.ToTable("diagnosis_template"); + + b.HasComment("诊断模板设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisTemplateDetail", b => + { + b.Property("DiagnosisTemplateId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_template_id") + .IsFixedLength(); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength(); + + b.HasKey("DiagnosisTemplateId", "DiagnosisId") + .HasName("pk_diagnosis_template_detail"); + + b.HasIndex("DiagnosisId"); + + b.ToTable("diagnosis_template_detail"); + + b.HasComment("诊断模板包含明细"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength(); + + b.Property("PathCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("path_code"); + + b.HasKey("Id"); + + b.ToTable("diagnosis_type"); + + b.HasComment("诊断类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.FollowUpMode", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("smallint") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("follow_up_mode"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.FollowUpPlan", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Content") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("content"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CycleDays") + .HasColumnType("smallint") + .HasColumnName("cycle_days"); + + b.Property("DoctorUserId") + .HasColumnType("uuid") + .HasColumnName("doctor_user_id"); + + b.Property("FollowUpModeId") + .HasColumnType("uuid") + .HasColumnName("follow_up_mode_id") + .IsFixedLength(); + + b.Property("FollowUpTypeId") + .HasColumnType("uuid") + .HasColumnName("follow_up_type_id") + .IsFixedLength(); + + b.Property("IsLoop") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_loop"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PerfomFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("perfom_flag"); + + b.Property("PerfomTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("perfom_time"); + + b.Property("PerfomUserId") + .HasColumnType("uuid") + .HasColumnName("perfom_user_id"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark"); + + b.HasKey("Id"); + + b.ToTable("follow_up_plan"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.FollowUpType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("smallint") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("follow_up_type"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ForSex", b => + { + b.Property("Id") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("id"); + + b.Property("DisplayName") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("SimpleCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("for_sex"); + + b.HasComment("可支持性别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Grouping", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ModifiedDate") + .HasColumnType("date") + .HasColumnName("modified_date"); + + b.Property("Modifier") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("modifier"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_grouping") + .IsUnique(); + + b.ToTable("grouping"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.GuideType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("guide_type"); + + b.HasComment("指引类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.HealthCertificate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("登记流水号"); + + b.Property("CertificateDate") + .HasColumnType("date") + .HasColumnName("certificate_date") + .HasComment("发证日期"); + + b.Property("CertificateNo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("certificate_no") + .HasComment("证件编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ServiceOrg") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("service_org") + .HasComment("服务单位"); + + b.Property("ServiceTradesId") + .HasColumnType("smallint") + .HasColumnName("service_trades_id") + .HasComment("服务行业"); + + b.HasKey("Id"); + + b.ToTable("health_certificate"); + + b.HasComment("健康证办理"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ImportLisResult", b => + { + b.Property("LisRequestNo") + .HasColumnType("uuid") + .HasColumnName("lis_request_no") + .HasComment("条码号"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .HasComment("项目"); + + b.Property("CheckDoctorName") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("check_doctor_name") + .HasComment("检查医生"); + + b.Property("CheckTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("check_time") + .HasComment("检查日期"); + + b.Property("CriticalRangeValue") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("critical_range_value"); + + b.Property("ImportTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("import_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)") + .HasComment("导入日期"); + + b.Property("ItemName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("item_name"); + + b.Property("PatientRegisterNo") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("patient_register_no") + .HasComment("条码号"); + + b.Property("ReferenceRangeValue") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("reference_range_value") + .HasComment("参考范围"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("ReportPrompt") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("report_prompt") + .HasComment("报告单提示"); + + b.Property("Result") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("result") + .HasComment("结果"); + + b.Property("Unit") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("unit") + .HasComment("单位"); + + b.HasKey("LisRequestNo", "ItemId") + .HasName("pk_import_lis_result"); + + b.HasIndex(new[] { "PatientRegisterNo" }, "ix_import_lis_result"); + + b.ToTable("import_lis_result"); + + b.HasComment("检验结果中间表"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ImportPacsPicture", b => + { + b.Property("CheckRequestNo") + .HasColumnType("uuid") + .HasColumnName("check_request_no"); + + b.Property("PictureFilename") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("picture_filename") + .HasComment("检查部位"); + + b.Property("AsbitemNames") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("asbitem_names") + .HasComment("组合项目名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("诊断结论"); + + b.Property("ImportTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("import_time") + .HasComment("导入日期"); + + b.Property("IsPrint") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_print") + .HasComment("检查所见"); + + b.Property("PatientRegisterNo") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("patient_register_no"); + + b.HasKey("CheckRequestNo", "PictureFilename") + .HasName("pk_import_pacs_picture_1"); + + b.ToTable("import_pacs_picture"); + + b.HasComment("pacs图片中间表"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ImportPacsResult", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AsbitemNames") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("asbitem_names") + .HasComment("组合项目名称"); + + b.Property("CheckDoctorName") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("check_doctor_name") + .HasComment("检查医生"); + + b.Property("CheckItems") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("check_items") + .HasComment("检查部位"); + + b.Property("CheckTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("check_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)") + .HasComment("检查日期"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("character varying(1000)") + .HasColumnName("description") + .HasComment("检查所见"); + + b.Property("ImportTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("import_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)") + .HasComment("导入日期"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PatientRegisterNo") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("patient_register_no"); + + b.Property("Suggestion") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("suggestion") + .HasComment("建议"); + + b.Property("Summary") + .HasMaxLength(1000) + .HasColumnType("character varying(1000)") + .HasColumnName("summary") + .HasComment("诊断结论"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "PatientRegisterNo" }, "ix_import_pacs_result"); + + b.ToTable("import_pacs_result"); + + b.HasComment("PACS结果中间表"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.InvoiceItemType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_invoice_item_type") + .IsUnique(); + + b.ToTable("invoice_item_type"); + + b.HasComment("发票项目类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.InvoiceOrg", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_invoice_org") + .IsUnique(); + + b.ToTable("invoice_org"); + + b.HasComment("发票单位设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Item", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CalculationFunction") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("calculation_function"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DefaultResult") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("default_result"); + + b.Property("DiagnosisFunction") + .HasMaxLength(2000) + .HasColumnType("character varying(2000)") + .HasColumnName("diagnosis_function"); + + b.Property("DisplayName") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("EnglishShortName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("english_short_name"); + + b.Property("InputCheck") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("input_check"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active"); + + b.Property("IsCalculationItem") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_calculation_item"); + + b.Property("IsContinueProcess") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_continue_process"); + + b.Property("IsDiagnosisFunction") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_diagnosis_function"); + + b.Property("IsNameIntoSummary") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_name_into_summary"); + + b.Property("IsProduceSummary") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_produce_summary"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price"); + + b.Property("PriceItemId") + .HasMaxLength(8) + .HasColumnType("uuid") + .HasColumnName("price_item_id") + .IsFixedLength(); + + b.Property("ReferenceRangeTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("reference_range_type_flag") + .HasDefaultValueSql("'E'::bpchar"); + + b.Property("ResultTemplateTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("result_template_type_flag") + .HasDefaultValueSql("0"); + + b.Property("SimpleCode") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("simple_code"); + + b.Property("UnitId") + .HasColumnType("uuid") + .HasColumnName("unit_id") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("ItemTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_item") + .IsUnique(); + + b.ToTable("item"); + + b.HasComment("项目设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemDefaultResult", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_item_default_result") + .IsUnique(); + + b.ToTable("item_default_result"); + + b.HasComment("项目默认结果设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultMatch", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("结果匹配编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength() + .HasComment("诊断编号"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1") + .HasComment("显示顺序"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Result") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("result") + .HasComment("结果"); + + b.HasKey("Id"); + + b.HasIndex("DiagnosisId"); + + b.HasIndex("ItemId"); + + b.ToTable("item_result_match"); + + b.HasComment("结果匹配设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("结果模板编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength() + .HasComment("诊断编号"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("IsNameIntoSummary") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_name_into_summary") + .HasComment("小结前是否加名称"); + + b.Property("IsResultIntoSummary") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_result_into_summary"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Result") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("result") + .HasComment("结果"); + + b.Property("ResultStatusId") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("result_status_id") + .HasComment("结果状态"); + + b.Property("SimpleCode") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("simple_code") + .HasComment("拼音简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "ItemId", "Result" }, "ix_item_result_template") + .IsUnique(); + + b.ToTable("item_result_template"); + + b.HasComment("项目结果模板设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultTemplateType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "ItemId", "DisplayName" }, "ix_item_result_template_type") + .IsUnique(); + + b.ToTable("item_result_template_type"); + + b.HasComment("项目结果模板类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_item_template") + .IsUnique(); + + b.ToTable("item_template"); + + b.HasComment("项目模板设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemTemplateDetail", b => + { + b.Property("ItemTemplateId") + .HasColumnType("uuid") + .HasColumnName("item_template_id") + .IsFixedLength(); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength(); + + b.HasKey("ItemTemplateId", "ItemId") + .HasName("pk_item_template_detail"); + + b.HasIndex("ItemId"); + + b.ToTable("item_template_detail"); + + b.HasComment("项目模板明细"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CheckTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("check_type_flag") + .HasDefaultValueSql("'G'::bpchar"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("GuidTypeId") + .HasColumnType("uuid") + .HasColumnName("guid_type_id") + .IsFixedLength(); + + b.Property("IsMergeAsbitem") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_merge_asbitem"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MedicalReportTypeId") + .HasColumnType("uuid") + .HasColumnName("medical_report_type_id") + .IsFixedLength(); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength(); + + b.Property("PathCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("path_code"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("GuidTypeId"); + + b.HasIndex("MedicalReportTypeId"); + + b.HasIndex(new[] { "DisplayName", "ParentId" }, "ix_item_type") + .IsUnique(); + + b.ToTable("item_type"); + + b.HasComment("项目类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.LisRequest", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("IsPrint") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_print"); + + b.Property("IsSignIn") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_sign_in"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LisRequestNo") + .HasColumnType("uuid") + .HasColumnName("lis_request_no"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("SampleContainerId") + .HasColumnType("uuid") + .HasColumnName("sample_container_id") + .IsFixedLength(); + + b.Property("SampleTypeId") + .HasColumnType("uuid") + .HasColumnName("sample_type_id") + .IsFixedLength(); + + b.Property("Sampler") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("sampler"); + + b.Property("SamplingTime") + .HasColumnType("date") + .HasColumnName("sampling_time"); + + b.Property("SignInOrder") + .HasColumnType("integer") + .HasColumnName("sign_in_order"); + + b.Property("SignInPerson") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("sign_in_person"); + + b.Property("SignInTime") + .HasColumnType("date") + .HasColumnName("sign_in_time"); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.HasIndex("SampleContainerId"); + + b.HasIndex("SampleTypeId"); + + b.HasIndex(new[] { "LisRequestNo" }, "ix_lis_request") + .IsUnique(); + + b.ToTable("lis_request"); + + b.HasComment("检验申请单"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MaritalStatus", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("id") + .HasDefaultValueSql("'0'::bpchar") + .HasComment("婚姻状况编号"); + + b.Property("DisplayName") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("display_name") + .HasComment("婚姻状况名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("SimpleCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_marital_status") + .IsUnique(); + + b.ToTable("marital_status"); + + b.HasComment("婚姻状况设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalConclusion", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("体检结论编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("体检结论名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MedicalConclusionTypeId") + .HasMaxLength(2) + .HasColumnType("character(2)") + .HasColumnName("medical_conclusion_type_id") + .IsFixedLength(); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex("MedicalConclusionTypeId"); + + b.ToTable("medical_conclusion"); + + b.HasComment("体检结论设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalConclusionType", b => + { + b.Property("Id") + .HasMaxLength(2) + .HasColumnType("character(2)") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_medical_conclusion_type") + .IsUnique(); + + b.ToTable("medical_conclusion_type"); + + b.HasComment("体检结论类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalPackage", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("套餐主档编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1") + .HasComment("显示顺序"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar") + .HasComment("适用性别"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active") + .HasComment("启用标志"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price") + .HasComment("价格"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_medical_package") + .IsUnique(); + + b.ToTable("medical_package"); + + b.HasComment("体检套餐主档设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalPackageDetail", b => + { + b.Property("MedicalPackageId") + .HasColumnType("uuid") + .HasColumnName("medical_package_id") + .IsFixedLength(); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength(); + + b.HasKey("MedicalPackageId", "AsbitemId") + .HasName("pk_medical_package_detail"); + + b.HasIndex("AsbitemId"); + + b.ToTable("medical_package_detail"); + + b.HasComment("体检套餐包含的组合项目设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalReportType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("medical_report_type"); + + b.HasComment("体检报告类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("体检类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("体检类别名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_medical_type") + .IsUnique(); + + b.ToTable("medical_type"); + + b.HasComment("体检类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Nation", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("CountryCode") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("country_code"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("拼音简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_nation") + .IsUnique(); + + b.ToTable("nation"); + + b.HasComment("民族设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.OcCheckType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("职业病检查类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OcCheckTypeName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("oc_check_type_name") + .HasComment("职业病检查类别名称"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("oc_check_type"); + + b.HasComment("职业病检查类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.OperateLog", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ComputerName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("computer_name"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OperateContent") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("operate_content"); + + b.Property("OperateTime") + .HasColumnType("date") + .HasColumnName("operate_time"); + + b.Property("OperateType") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("operate_type"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark"); + + b.Property("Sqlsyntax") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("sqlsyntax"); + + b.Property("TableName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("table_name"); + + b.Property("UserId") + .HasMaxLength(16) + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("WindowName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("window_name"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "ComputerName" }, "ix_operate_log"); + + b.HasIndex(new[] { "WindowName" }, "ix_operate_log_1"); + + b.ToTable("operate_log"); + + b.HasComment("操作日志"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.OrganizationUnitsCustomerOrg", b => + { + b.Property("CustomerOrgId") + .HasColumnType("uuid") + .HasColumnName("customer_org_id") + .IsFixedLength(); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id") + .IsFixedLength(); + + b.HasKey("CustomerOrgId", "OrganizationUnitId") + .HasName("pk_medical_center_org"); + + b.HasIndex("OrganizationUnitId"); + + b.ToTable("organization_units_customer_org"); + + b.HasComment("体检中心单位权限"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Patient", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Address") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("address"); + + b.Property("BirthDate") + .HasColumnType("date") + .HasColumnName("birth_date"); + + b.Property("BirthPlaceId") + .HasColumnType("uuid") + .HasColumnName("birth_place_id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("display_name"); + + b.Property("Email") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("email"); + + b.Property("IdNo") + .HasMaxLength(18) + .HasColumnType("character varying(18)") + .HasColumnName("id_no"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MaritalStatusId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("marital_status_id"); + + b.Property("MobileTelephone") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("mobile_telephone"); + + b.Property("NationId") + .HasColumnType("uuid") + .HasColumnName("nation_id") + .IsFixedLength(); + + b.Property("PatientNo") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("patient_no") + .HasComment("档案号"); + + b.Property("PatientPassword") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("patient_password"); + + b.Property("PostalCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("postal_code"); + + b.Property("SexId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("sex_id"); + + b.Property("Telephone") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("telephone"); + + b.HasKey("Id"); + + b.HasIndex("PatientNo") + .IsUnique(); + + b.HasIndex(new[] { "IdNo" }, "ix_patient"); + + b.HasIndex(new[] { "DisplayName" }, "ix_patient_1"); + + b.ToTable("patient"); + + b.HasComment("体检人员档案"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientOccupationalDisease", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AbnormalTimes") + .HasColumnType("integer") + .HasColumnName("abnormal_times"); + + b.Property("AbortionTimes") + .HasColumnType("integer") + .HasColumnName("abortion_times"); + + b.Property("ChildrenNum") + .HasColumnType("integer") + .HasColumnName("children_num"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DiagnosisDate") + .HasColumnType("date") + .HasColumnName("diagnosis_date"); + + b.Property("DiagnosisHospital") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("diagnosis_hospital"); + + b.Property("DrinkFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("drink_flag"); + + b.Property("DrinkNum") + .HasColumnType("integer") + .HasColumnName("drink_num"); + + b.Property("DrinkYears") + .HasColumnType("integer") + .HasColumnName("drink_years"); + + b.Property("FirstMenstruation") + .HasColumnType("integer") + .HasColumnName("first_menstruation"); + + b.Property("HandleSuggestion") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("handle_suggestion"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MenstrualHistory") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("menstrual_history"); + + b.Property("MenstruationCycle") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("menstruation_cycle"); + + b.Property("MenstruationEndAge") + .HasColumnType("integer") + .HasColumnName("menstruation_end_age"); + + b.Property("MenstruationFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("menstruation_flag"); + + b.Property("MenstruationTimeLength") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("menstruation_time_length"); + + b.Property("NoOccupAbSuggestion") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("no_occup_ab_suggestion"); + + b.Property("NoOccupationalAbnormal") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("no_occupational_abnormal"); + + b.Property("OcCheckTypeId") + .HasColumnType("uuid") + .HasColumnName("oc_check_type_id") + .IsFixedLength(); + + b.Property("OccupationalAbSuggestion") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("occupational_ab_suggestion"); + + b.Property("OccupationalAbnormal") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("occupational_abnormal"); + + b.Property("OccupationalDisease") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("occupational_disease"); + + b.Property("Other") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("other"); + + b.Property("PoisonWorkTime") + .HasMaxLength(6) + .HasColumnType("character varying(6)") + .HasColumnName("poison_work_time"); + + b.Property("PrematureBirthTimes") + .HasColumnType("integer") + .HasColumnName("premature_birth_times"); + + b.Property("PreviousHistory") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("previous_history"); + + b.Property("Recovery") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("recovery"); + + b.Property("SmokeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("smoke_flag"); + + b.Property("SmokeNum") + .HasColumnType("integer") + .HasColumnName("smoke_num"); + + b.Property("SmokeYears") + .HasColumnType("integer") + .HasColumnName("smoke_years"); + + b.Property("StillbirthTimes") + .HasColumnType("integer") + .HasColumnName("stillbirth_times"); + + b.Property("TotalWorkTime") + .HasMaxLength(6) + .HasColumnType("character varying(6)") + .HasColumnName("total_work_time"); + + b.HasKey("Id"); + + b.ToTable("patient_occupational_disease"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientOccupationalHistory", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("BeginDate") + .HasColumnType("date") + .HasColumnName("begin_date"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("EndDate") + .HasColumnType("date") + .HasColumnName("end_date"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Org") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("org"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("Poison") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("poison"); + + b.Property("ProtectiveMeasures") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("protective_measures"); + + b.Property("WorkShop") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("work_shop"); + + b.Property("WorkType") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("work_type"); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.ToTable("patient_occupational_history"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientPoison", b => + { + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("PoisonId") + .HasColumnType("uuid") + .HasColumnName("poison_id") + .IsFixedLength(); + + b.HasKey("PatientRegisterId", "PoisonId") + .HasName("pk_patient_poison"); + + b.HasIndex("PoisonId"); + + b.ToTable("patient_poison"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientRegister", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("登记流水号"); + + b.Property("Age") + .HasColumnType("smallint") + .HasColumnName("age") + .HasComment("年龄"); + + b.Property("AuditDate") + .HasColumnType("date") + .HasColumnName("audit_date"); + + b.Property("AuditDoctor") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("audit_doctor"); + + b.Property("BirthDate") + .HasColumnType("date") + .HasColumnName("birth_date"); + + b.Property("CompleteFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("complete_flag") + .HasDefaultValueSql("'0'::bpchar") + .HasComment("完成标志"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgGroupId") + .HasColumnType("uuid") + .HasColumnName("customer_org_group_id") + .IsFixedLength() + .HasComment("分组"); + + b.Property("CustomerOrgId") + .HasColumnType("uuid") + .HasColumnName("customer_org_id") + .IsFixedLength() + .HasComment("单位编号"); + + b.Property("CustomerOrgRegisterId") + .HasColumnType("uuid") + .HasColumnName("customer_org_register_id"); + + b.Property("GuidePrintTimes") + .HasColumnType("smallint") + .HasColumnName("guide_print_times"); + + b.Property("InterposeMeasure") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("interpose_measure") + .HasComment("干预措施"); + + b.Property("IsAudit") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_audit"); + + b.Property("IsLock") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_lock"); + + b.Property("IsMedicalStart") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_medical_start") + .HasComment("体检开始标志"); + + b.Property("IsNameHide") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_name_hide"); + + b.Property("IsPhoneFollow") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_phone_follow"); + + b.Property("IsRecoverGuide") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_recover_guide"); + + b.Property("IsUpload") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_upload"); + + b.Property("IsVip") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_vip"); + + b.Property("JobCardNo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("job_card_no") + .HasComment("工卡号"); + + b.Property("JobPost") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("job_post") + .HasComment("职务"); + + b.Property("JobTitle") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("job_title") + .HasComment("职称"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MaritalStatusId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("marital_status_id") + .HasDefaultValueSql("'0'::bpchar") + .HasComment("婚姻状况"); + + b.Property("MedicalCardNo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("medical_card_no"); + + b.Property("MedicalConclusionId") + .HasColumnType("uuid") + .HasColumnName("medical_conclusion_id") + .IsFixedLength() + .HasComment("体检结论"); + + b.Property("MedicalPackageId") + .HasColumnType("uuid") + .HasColumnName("medical_package_id") + .IsFixedLength() + .HasComment("套餐"); + + b.Property("MedicalStartDate") + .ValueGeneratedOnAdd() + .HasColumnType("date") + .HasColumnName("medical_start_date") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)") + .HasComment("体检开始日期"); + + b.Property("MedicalTimes") + .HasColumnType("smallint") + .HasColumnName("medical_times") + .HasComment("体检次数"); + + b.Property("MedicalTypeId") + .HasColumnType("uuid") + .HasColumnName("medical_type_id") + .IsFixedLength() + .HasComment("体检类别"); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id"); + + b.Property("PatientId") + .HasMaxLength(10) + .HasColumnType("uuid") + .HasColumnName("patient_id") + .HasComment("档案号"); + + b.Property("PatientName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("patient_name") + .HasComment("姓名"); + + b.Property("PatientRegisterNo") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("patient_register_no") + .HasComment("条码号"); + + b.Property("PersonnelTypeId") + .HasColumnType("uuid") + .HasColumnName("personnel_type_id") + .IsFixedLength() + .HasComment("人员类别"); + + b.Property("Photo") + .HasColumnType("bytea") + .HasColumnName("photo") + .HasComment("照片"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark"); + + b.Property("ReportPrintTimes") + .HasColumnType("smallint") + .HasColumnName("report_print_times") + .HasComment("体检报告打印次数"); + + b.Property("Salesman") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("salesman") + .HasComment("介绍人"); + + b.Property("SexHormoneTermId") + .HasColumnType("uuid") + .HasColumnName("sex_hormone_term_id") + .IsFixedLength(); + + b.Property("SexId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("sex_id") + .HasComment("性别"); + + b.Property("SummaryDate") + .HasColumnType("date") + .HasColumnName("summary_date") + .HasComment("总检日期"); + + b.Property("SummaryDoctor") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("summary_doctor") + .HasComment("总检医生"); + + b.Property("ThirdInfo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("third_info"); + + b.HasKey("Id"); + + b.HasIndex("MaritalStatusId"); + + b.HasIndex(new[] { "CustomerOrgRegisterId" }, "fki_fk_patient_register_org_register"); + + b.HasIndex(new[] { "OrganizationUnitId" }, "fki_fk_patient_register_ororganization_unit"); + + b.HasIndex(new[] { "PatientRegisterNo" }, "ix_patient_register") + .IsUnique(); + + b.HasIndex(new[] { "PatientId", "MedicalTimes" }, "ix_patient_register_1") + .IsUnique(); + + b.HasIndex(new[] { "PatientName" }, "ix_patient_register_2"); + + b.ToTable("patient_register"); + + b.HasComment("体检登记主档"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientSymptom", b => + { + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("SymptomId") + .HasColumnType("uuid") + .HasColumnName("symptom_id") + .IsFixedLength(); + + b.Property("Degree") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("degree"); + + b.Property("TimeLength") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("time_length"); + + b.HasKey("PatientRegisterId", "SymptomId") + .HasName("pk_patient_symptom"); + + b.HasIndex("SymptomId"); + + b.ToTable("patient_symptom"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PayMode", b => + { + b.Property("Id") + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_payment_mode") + .IsUnique(); + + b.ToTable("pay_mode"); + + b.HasComment("支付方式设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PersonnelType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("人员类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("人员类别名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_personnel_type") + .IsUnique(); + + b.ToTable("personnel_type"); + + b.HasComment("人员类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PhoneFollow", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("FollowContent") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("follow_content"); + + b.Property("FollowUpPlanId") + .HasColumnType("uuid") + .HasColumnName("follow_up_plan_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("ReplyContent") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("reply_content"); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.ToTable("phone_follow"); + + b.HasComment("电话随访"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Poison", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("毒害编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("毒害名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PoisonTypeId") + .HasColumnType("uuid") + .HasColumnName("poison_type_id") + .IsFixedLength(); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("PoisonTypeId"); + + b.ToTable("poison"); + + b.HasComment("毒害因素设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PoisonType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("毒害类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("毒害类别名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("poison_type"); + + b.HasComment("毒害因素类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PositionType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("职务编号"); + + b.Property("CreationTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("职务名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime") + .HasComment("最后修改日期"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId") + .HasComment("最后修改者"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_position_type") + .IsUnique(); + + b.ToTable("position_type"); + + b.HasComment("职务类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PriceItem", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("InvoiceItemTypeId") + .HasColumnType("uuid") + .HasColumnName("invoice_item_type_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price"); + + b.Property("PriceItemCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("price_item_code"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("InvoiceItemTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_price_item") + .IsUnique(); + + b.ToTable("price_item"); + + b.HasComment("价表项目设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PrimarykeyBuilder", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("主键编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DateString") + .HasMaxLength(8) + .HasColumnType("character(8)") + .HasColumnName("date_string") + .IsFixedLength() + .HasComment("日期"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SerialNo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("serial_no") + .HasComment("序列号"); + + b.HasKey("Id"); + + b.ToTable("primarykey_builder"); + + b.HasComment("主键产生器"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.QueueRegister", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CallTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("call_time"); + + b.Property("CompleteFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("complete_flag") + .HasDefaultValueSql("0"); + + b.Property("CreationTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("NoCompleteReason") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("no_complete_reason") + .HasDefaultValueSql("0"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("RoomId") + .HasColumnType("uuid") + .HasColumnName("room_id") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.ToTable("queue_register"); + + b.HasComment("排队登记"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ReferenceRange", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("参考范围编号"); + + b.Property("AgeLowerLimit") + .HasColumnType("smallint") + .HasColumnName("age_lower_limit") + .HasComment("年龄下限"); + + b.Property("AgeUpperLimit") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasColumnName("age_upper_limit") + .HasDefaultValueSql("200") + .HasComment("年龄上限"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CriticalRangeValue") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("critical_range_value"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar") + .HasComment("性别"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LowerDiagnosisId") + .HasColumnType("uuid") + .HasColumnName("lower_diagnosis_id") + .IsFixedLength() + .HasComment("偏低诊断"); + + b.Property("ReferenceRangeTypeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("reference_range_type_flag"); + + b.Property("ReferenceRangeValue") + .HasMaxLength(150) + .HasColumnType("character varying(150)") + .HasColumnName("reference_range_value"); + + b.Property("UpperDiagnosisId") + .HasColumnType("uuid") + .HasColumnName("upper_diagnosis_id") + .IsFixedLength() + .HasComment("偏高诊断"); + + b.HasKey("Id"); + + b.HasIndex("ItemId"); + + b.ToTable("reference_range"); + + b.HasComment("项目参考范围设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterAsbitem", b => + { + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id"); + + b.Property("AsbitemId") + .HasMaxLength(6) + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength() + .HasComment("组合项目"); + + b.Property("Amount") + .HasColumnType("smallint") + .HasColumnName("amount"); + + b.Property("ChargePrice") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_price") + .HasComment("实收价格"); + + b.Property("IsCharge") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_charge") + .HasComment("是否已收费"); + + b.Property("LisRequestId") + .HasMaxLength(20) + .HasColumnType("uuid") + .HasColumnName("lis_request_id"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("登记流水号"); + + b.Property("PayTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("pay_type_flag") + .HasDefaultValueSql("0") + .HasComment("支付方式,比如是自费、免费、单位支付"); + + b.Property("RegisterAsbitemId") + .HasColumnType("uuid") + .HasColumnName("register_asbitem_id"); + + b.Property("StandardPrice") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("standard_price") + .HasComment("标准价格"); + + b.HasKey("RegisterCheckId", "AsbitemId") + .HasName("pk_register_asbitem"); + + b.HasIndex("AsbitemId"); + + b.HasIndex(new[] { "PatientRegisterId", "AsbitemId" }, "ix_register_asbitem") + .IsUnique(); + + b.ToTable("register_asbitem"); + + b.HasComment("检查组合项目记录"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheck", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AuditTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("audit_time"); + + b.Property("AuditorUserId") + .HasColumnType("uuid") + .HasColumnName("auditor_user_id"); + + b.Property("CheckDate") + .HasColumnType("date") + .HasColumnName("check_date"); + + b.Property("CheckDoctorId") + .HasColumnType("uuid") + .HasColumnName("check_doctor_id"); + + b.Property("CheckRequestNo") + .HasMaxLength(20) + .HasColumnType("uuid") + .HasColumnName("check_request_no"); + + b.Property("CheckRequestPrintTimes") + .HasColumnType("smallint") + .HasColumnName("check_request_print_times"); + + b.Property("CompleteFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("complete_flag") + .HasDefaultValueSql("0"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CriticalValue") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("critical_value"); + + b.Property("CriticalValueCreateDate") + .HasColumnType("date") + .HasColumnName("critical_value_create_date"); + + b.Property("CriticalValueFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("critical_value_flag") + .HasDefaultValueSql("0"); + + b.Property("CriticalValueProcessContent") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("critical_value_process_content"); + + b.Property("CriticalValueProcessDate") + .HasColumnType("date") + .HasColumnName("critical_value_process_date"); + + b.Property("CriticalValueProcessDoctor") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("critical_value_process_doctor"); + + b.Property("CriticalValueProcessFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("critical_value_process_flag"); + + b.Property("IsAudit") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_audit"); + + b.Property("IsLock") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_lock"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ThirdInfo") + .HasMaxLength(80) + .HasColumnType("character varying(80)") + .HasColumnName("third_info"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "CheckRequestNo" }, "ix_register_check_1"); + + b.ToTable("register_check"); + + b.HasComment("登记检查单"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckCriticalValue", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CriticalValue") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("critical_value"); + + b.Property("Doctor") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("doctor"); + + b.Property("IsComplete") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_complete"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ProcessTypeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("process_type_flag"); + + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id"); + + b.HasKey("Id"); + + b.ToTable("register_check_critical_value"); + + b.HasComment("检查危急值"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckItem", b => + { + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目"); + + b.Property("CheckDate") + .HasColumnType("date") + .HasColumnName("check_date") + .HasComment("检查日期"); + + b.Property("CheckDoctorName") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("check_doctor_name") + .HasComment("检查医生"); + + b.Property("CriticalRangeValue") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("critical_range_value"); + + b.Property("CriticalValue") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("critical_value"); + + b.Property("ReferenceRangeValue") + .ValueGeneratedOnAdd() + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("reference_range_value") + .HasDefaultValueSql("''::character varying") + .HasComment("参考范围"); + + b.Property("Result") + .HasMaxLength(1000) + .HasColumnType("character varying(1000)") + .HasColumnName("result") + .HasComment("结果"); + + b.Property("ResultStatusId") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("result_status_id") + .HasComment("报告单提示"); + + b.Property("Unit") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("unit"); + + b.HasKey("RegisterCheckId", "ItemId") + .HasName("pk_register_item_1"); + + b.HasIndex("ItemId"); + + b.HasIndex("ResultStatusId"); + + b.ToTable("register_check_item"); + + b.HasComment("检查明细项目记录"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckPicture", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("检查图片编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1") + .HasComment("显示顺序"); + + b.Property("IsPrint") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_print") + .HasComment("打印标志"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PictureFilename") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("picture_filename") + .HasComment("图片名"); + + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id") + .HasComment("登记流水号"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "RegisterCheckId", "PictureFilename" }, "ix_check_picture") + .IsUnique(); + + b.ToTable("register_check_picture"); + + b.HasComment("体检登记组合项目图片"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckSuggestion", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id"); + + b.Property("Suggestion") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("suggestion"); + + b.HasKey("Id"); + + b.HasIndex("RegisterCheckId"); + + b.ToTable("register_check_suggestion"); + + b.HasComment("登记检查建议"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckSummary", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id"); + + b.Property("Summary") + .HasMaxLength(500) + .HasColumnType("character varying(500)") + .HasColumnName("summary"); + + b.Property("SummaryFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("summary_flag"); + + b.HasKey("Id"); + + b.HasIndex("RegisterCheckId"); + + b.ToTable("register_check_summary"); + + b.HasComment("登记检查综述"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ResultStatus", b => + { + b.Property("Id") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("id"); + + b.Property("DataInputBackgroundColor") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("data_input_background_color") + .HasDefaultValueSql("16777215"); + + b.Property("DataInputFontColor") + .HasColumnType("integer") + .HasColumnName("data_input_font_color"); + + b.Property("DataInputPrompt") + .HasMaxLength(8) + .HasColumnType("character varying(8)") + .HasColumnName("data_input_prompt"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("ReportBackgroundColor") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("report_background_color") + .HasDefaultValueSql("16777215"); + + b.Property("ReportFontColor") + .HasColumnType("integer") + .HasColumnName("report_font_color"); + + b.Property("ReportPrompt") + .HasMaxLength(8) + .HasColumnType("character varying(8)") + .HasColumnName("report_prompt"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_result_status") + .IsUnique(); + + b.ToTable("result_status"); + + b.HasComment("结果状态设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Room", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DepartmentId") + .HasColumnType("uuid") + .HasColumnName("department_id") + .IsFixedLength(); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("RoomTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("room_type_flag") + .HasDefaultValueSql("0"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("DepartmentId"); + + b.HasIndex("ItemTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_room") + .IsUnique(); + + b.ToTable("room"); + + b.HasComment("房间设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleContainer", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("ContainerColor") + .HasColumnType("integer") + .HasColumnName("container_color"); + + b.Property("ContainerColorName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("container_color_name"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_sample_container") + .IsUnique(); + + b.ToTable("sample_container"); + + b.HasComment("标本容器设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleGroup", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SampleContainerId") + .HasColumnType("uuid") + .HasColumnName("sample_container_id") + .IsFixedLength(); + + b.Property("SampleTypeId") + .HasColumnType("uuid") + .HasColumnName("sample_type_id") + .IsFixedLength(); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("SampleContainerId"); + + b.HasIndex("SampleTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_sample_group") + .IsUnique(); + + b.ToTable("sample_group"); + + b.HasComment("标本分组设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleGroupDetail", b => + { + b.Property("SampleGroupId") + .HasColumnType("uuid") + .HasColumnName("sample_group_id") + .IsFixedLength(); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength(); + + b.HasKey("SampleGroupId", "AsbitemId") + .HasName("pk_sample_group_detail"); + + b.HasIndex(new[] { "AsbitemId" }, "ix_sample_group_detail") + .IsUnique(); + + b.ToTable("sample_group_detail"); + + b.HasComment("标本分组包含组合项目设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_sample_type"); + + b.ToTable("sample_type"); + + b.HasComment("标本类型设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ServiceTrade", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DepartmentId") + .HasColumnType("uuid") + .HasColumnName("department_id") + .IsFixedLength(); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("ValidPeriod") + .HasColumnType("smallint") + .HasColumnName("valid_period") + .HasComment("有效期"); + + b.Property("ValidPeriodDisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("valid_period_display_name"); + + b.Property("ValidPeriodUnit") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("valid_period_unit"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DepartmentId", "DisplayName" }, "ix_service_trades") + .IsUnique(); + + b.ToTable("service_trades"); + + b.HasComment("服务行业设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SettleAccount", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CompletedBy") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("completed_by"); + + b.Property("CompletedTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("completed_time"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("IsComplete") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_complete"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.ToTable("settle_account"); + + b.HasComment("结账"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Sex", b => + { + b.Property("Id") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("id"); + + b.Property("DisplayName") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("SimpleCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("sex"); + + b.HasComment("性别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SexHormoneReferenceRange", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("AgeLowerLimit") + .HasColumnType("smallint") + .HasColumnName("age_lower_limit"); + + b.Property("AgeUpperLimit") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasColumnName("age_upper_limit") + .HasDefaultValueSql("200"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CriticalRangeValue") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("critical_range_value"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LowerDiagnosisId") + .HasColumnType("uuid") + .HasColumnName("lower_diagnosis_id") + .IsFixedLength(); + + b.Property("ReferenceRangeValue") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("reference_range_value"); + + b.Property("SexHormoneTermId") + .HasColumnType("uuid") + .HasColumnName("sex_hormone_term_id") + .IsFixedLength(); + + b.Property("UpperDiagnosisId") + .HasColumnType("uuid") + .HasColumnName("upper_diagnosis_id") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("ItemId"); + + b.HasIndex("SexHormoneTermId"); + + b.ToTable("sex_hormone_reference_range"); + + b.HasComment("性激素参考范围设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SexHormoneTerm", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_sex_hormone_term") + .IsUnique(); + + b.ToTable("sex_hormone_term"); + + b.HasComment("性激素期限设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SmsSend", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Content") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("content"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("FollowUpPlanId") + .HasColumnType("uuid") + .HasColumnName("follow_up_plan_id"); + + b.Property("IsComplete") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_complete"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MobileTelephone") + .HasMaxLength(11) + .HasColumnType("character varying(11)") + .HasColumnName("mobile_telephone"); + + b.Property("PatientId") + .HasMaxLength(10) + .HasColumnType("uuid") + .HasColumnName("patient_id"); + + b.Property("PatientName") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("patient_name"); + + b.Property("SmsTypeId") + .HasColumnType("uuid") + .HasColumnName("sms_type_id") + .IsFixedLength(); + + b.HasKey("Id"); + + b.ToTable("sms_send"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SmsTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("Content") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("content"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("smallint") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("SmsTypeId") + .HasColumnType("uuid") + .HasColumnName("sms_type_id") + .IsFixedLength(); + + b.HasKey("Id"); + + b.ToTable("sms_template"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SmsType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("smallint") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("sms_type"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Suggestion", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength(); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SuggestionContent") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("suggestion_content"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DiagnosisId", "SuggestionContent" }, "ix_suggestion") + .IsUnique(); + + b.ToTable("suggestion"); + + b.HasComment("建议设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumDiagnosis", b => + { + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength(); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("SumSuggestionHeaderId") + .HasColumnType("uuid") + .HasColumnName("sum_suggestion_header_id"); + + b.HasKey("PatientRegisterId", "DiagnosisId") + .HasName("pk_summary_diagnosis"); + + b.HasIndex("DiagnosisId"); + + b.ToTable("sum_diagnosis"); + + b.HasComment("总检诊断"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SummaryTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("TemplateContent") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("template_content"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_summary_template") + .IsUnique(); + + b.ToTable("summary_template"); + + b.HasComment("综述模板设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSuggestionContent", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SuggestionContent") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("suggestion_content"); + + b.Property("SumSuggestionHeaderId") + .HasColumnType("uuid") + .HasColumnName("sum_suggestion_header_id"); + + b.HasKey("Id"); + + b.HasIndex("SumSuggestionHeaderId"); + + b.ToTable("sum_suggestion_content"); + + b.HasComment("总检建议内容"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSuggestionHeader", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("SuggestionFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("suggestion_flag"); + + b.Property("SuggestionTitle") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("suggestion_title"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "PatientRegisterId", "SuggestionTitle" }, "ix_sum_suggestion_title") + .IsUnique(); + + b.ToTable("sum_suggestion_header"); + + b.HasComment("总检建议头"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSummaryContent", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SumSummaryHeaderId") + .HasColumnType("uuid") + .HasColumnName("sum_summary_header_id"); + + b.Property("SummaryContent") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("summary_content"); + + b.HasKey("Id"); + + b.HasIndex("SumSummaryHeaderId"); + + b.ToTable("sum_summary_content"); + + b.HasComment("总检综述内容"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSummaryHeader", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("SummaryFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("summary_flag"); + + b.Property("SummaryTitle") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("summary_title"); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.ToTable("sum_summary_header"); + + b.HasComment("总检综述头"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Symptom", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("症状编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("症状名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("symptom"); + + b.HasComment("症状"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Sysdiagram", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("Definition") + .HasColumnType("bytea") + .HasColumnName("definition"); + + b.Property("DisplayName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("display_name"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PrincipalId") + .HasColumnType("uuid") + .HasColumnName("principal_id"); + + b.Property("Version") + .HasColumnType("integer") + .HasColumnName("version"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "PrincipalId", "DisplayName" }, "uk_principal_name") + .IsUnique(); + + b.ToTable("sysdiagrams"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParm", b => + { + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("SysParmTypeId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("sys_parm_type_id"); + + b.Property("ValueType") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("value_type"); + + b.HasKey("Id"); + + b.HasIndex("SysParmTypeId"); + + b.ToTable("sys_parm"); + + b.HasComment("系统参数设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmType", b => + { + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("parent_id"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("sys_parm_type"); + + b.HasComment("系统参数类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmValue", b => + { + b.Property("SysParmId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("sys_parm_id"); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParmValue") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("parm_value"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark"); + + b.HasKey("SysParmId", "OrganizationUnitId") + .HasName("pk_sys_parm_value"); + + b.ToTable("sys_parm_value"); + + b.HasComment("系统参数值设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmValueOption", b => + { + b.Property("SysParmId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("sys_parm_id"); + + b.Property("ValueOption") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("value_option"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("ValueOptionName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("value_option_name"); + + b.HasKey("SysParmId", "ValueOption") + .HasName("pk_sys_parm_value_option"); + + b.ToTable("sys_parm_value_option"); + + b.HasComment("系统参数可选值设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.TitleType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("职称类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("职称类别名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_title_type") + .IsUnique(); + + b.ToTable("title_type"); + + b.HasComment("职称类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Unit", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("unit"); + + b.HasComment("单位设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.User", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Address") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("address"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DepartmentId") + .HasColumnType("uuid") + .HasColumnName("department_id") + .IsFixedLength(); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("Email") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("email"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LockScreenTimeInterval") + .HasColumnType("integer") + .HasColumnName("lock_screen_time_interval"); + + b.Property("ModifiedDate") + .ValueGeneratedOnAdd() + .HasColumnType("date") + .HasColumnName("modified_date") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("Modifier") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("modifier"); + + b.Property("PasswordHash") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("password_hash"); + + b.Property("PasswordSalt") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("password_salt"); + + b.Property("Photo") + .HasColumnType("bytea") + .HasColumnName("photo"); + + b.Property("PositionTypeId") + .HasColumnType("uuid") + .HasColumnName("position_type_id"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark"); + + b.Property("SexId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("sex_id"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("Telephone") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("telephone"); + + b.Property("TitleTypeId") + .HasColumnType("uuid") + .HasColumnName("title_type_id"); + + b.Property("UserTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("user_type_flag") + .HasDefaultValueSql("0") + .HasComment("用户类型"); + + b.HasKey("Id"); + + b.HasIndex("DepartmentId"); + + b.ToTable("users"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserDepartment", b => + { + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("DepartmentId") + .HasColumnType("uuid") + .HasColumnName("department_id") + .IsFixedLength(); + + b.HasKey("UserId", "DepartmentId") + .HasName("pk_user_operate_department"); + + b.HasIndex("DepartmentId"); + + b.ToTable("user_department"); + + b.HasComment("用户科室操作权限"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserGrouping", b => + { + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("GroupingId") + .HasColumnType("uuid") + .HasColumnName("grouping_id"); + + b.HasKey("UserId", "GroupingId") + .HasName("pk_user_grouping"); + + b.HasIndex("GroupingId"); + + b.ToTable("user_grouping"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserItemType", b => + { + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength(); + + b.HasKey("UserId", "ItemTypeId") + .HasName("pk_user_item_type"); + + b.HasIndex("ItemTypeId"); + + b.ToTable("user_item_type"); + + b.HasComment("用户项目类别权限设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserRight", b => + { + b.Property("Application") + .HasMaxLength(32) + .HasColumnType("character varying(32)") + .HasColumnName("application"); + + b.Property("WindowName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("window_name"); + + b.Property("ControlName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("control_name"); + + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("IsUser") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_user"); + + b.Property("Status") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("status"); + + b.HasKey("Application", "WindowName", "ControlName", "UserId", "IsUser") + .HasName("pk_sys_function"); + + b.ToTable("user_rights"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("character varying(96)") + .HasColumnName("ApplicationName"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("BrowserInfo"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("ClientId"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("ClientIpAddress"); + + b.Property("ClientName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("ClientName"); + + b.Property("Comments") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("Comments"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("CorrelationId"); + + b.Property("Exceptions") + .HasColumnType("text"); + + b.Property("ExecutionDuration") + .HasColumnType("integer") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("timestamp without time zone"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("HttpMethod") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("HttpMethod"); + + b.Property("HttpStatusCode") + .HasColumnType("integer") + .HasColumnName("HttpStatusCode"); + + b.Property("ImpersonatorTenantId") + .HasColumnType("uuid") + .HasColumnName("ImpersonatorTenantId"); + + b.Property("ImpersonatorTenantName") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("ImpersonatorTenantName"); + + b.Property("ImpersonatorUserId") + .HasColumnType("uuid") + .HasColumnName("ImpersonatorUserId"); + + b.Property("ImpersonatorUserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("ImpersonatorUserName"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("TenantName"); + + b.Property("Url") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("Url"); + + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("UserId"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ExecutionTime"); + + b.HasIndex("TenantId", "UserId", "ExecutionTime"); + + b.ToTable("AbpAuditLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("AuditLogId") + .HasColumnType("uuid") + .HasColumnName("AuditLogId"); + + b.Property("ExecutionDuration") + .HasColumnType("integer") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("ExecutionTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("MethodName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("MethodName"); + + b.Property("Parameters") + .HasMaxLength(2000) + .HasColumnType("character varying(2000)") + .HasColumnName("Parameters"); + + b.Property("ServiceName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("ServiceName"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); + + b.ToTable("AbpAuditLogActions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("AuditLogId") + .HasColumnType("uuid") + .HasColumnName("AuditLogId"); + + b.Property("ChangeTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("ChangeTime"); + + b.Property("ChangeType") + .HasColumnType("smallint") + .HasColumnName("ChangeType"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("EntityId"); + + b.Property("EntityTenantId") + .HasColumnType("uuid"); + + b.Property("EntityTypeFullName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("EntityTypeFullName"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); + + b.ToTable("AbpEntityChanges", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("EntityChangeId") + .HasColumnType("uuid"); + + b.Property("NewValue") + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("NewValue"); + + b.Property("OriginalValue") + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("OriginalValue"); + + b.Property("PropertyName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("PropertyName"); + + b.Property("PropertyTypeFullName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("PropertyTypeFullName"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityChangeId"); + + b.ToTable("AbpEntityPropertyChanges", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsAbandoned") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false); + + b.Property("JobArgs") + .IsRequired() + .HasMaxLength(1048576) + .HasColumnType("character varying(1048576)"); + + b.Property("JobName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("LastTryTime") + .HasColumnType("timestamp without time zone"); + + b.Property("NextTryTime") + .HasColumnType("timestamp without time zone"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasDefaultValue((byte)15); + + b.Property("TryCount") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasDefaultValue((short)0); + + b.HasKey("Id"); + + b.HasIndex("IsAbandoned", "NextTryTime"); + + b.ToTable("AbpBackgroundJobs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpFeatureValues", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsStatic") + .HasColumnType("boolean"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("Regex") + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("RegexDescription") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("Required") + .HasColumnType("boolean"); + + b.Property("ValueType") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("SourceTenantId") + .HasColumnType("uuid"); + + b.Property("SourceUserId") + .HasColumnType("uuid"); + + b.Property("TargetTenantId") + .HasColumnType("uuid"); + + b.Property("TargetUserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique(); + + b.ToTable("AbpLinkUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDefault") + .HasColumnType("boolean") + .HasColumnName("IsDefault"); + + b.Property("IsPublic") + .HasColumnType("boolean") + .HasColumnName("IsPublic"); + + b.Property("IsStatic") + .HasColumnType("boolean") + .HasColumnName("IsStatic"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.Property("RoleId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Action") + .HasMaxLength(96) + .HasColumnType("character varying(96)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("character varying(96)"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("Identity") + .HasMaxLength(96) + .HasColumnType("character varying(96)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Action"); + + b.HasIndex("TenantId", "ApplicationName"); + + b.HasIndex("TenantId", "Identity"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSecurityLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("boolean") + .HasColumnName("IsActive"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsExternal") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsExternal"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); + + b.Property("LockoutEnd") + .HasColumnType("timestamp with time zone"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("Name"); + + b.Property("NormalizedEmail") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("NormalizedEmail"); + + b.Property("NormalizedUserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("NormalizedUserName"); + + b.Property("PasswordHash") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("PasswordHash"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("SecurityStamp"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("Email"); + + b.HasIndex("NormalizedEmail"); + + b.HasIndex("NormalizedUserName"); + + b.HasIndex("UserName"); + + b.ToTable("AbpUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderDisplayName") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(196) + .HasColumnType("character varying(196)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "LoginProvider"); + + b.HasIndex("LoginProvider", "ProviderKey"); + + b.ToTable("AbpUserLogins", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uuid"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "UserId"); + + b.HasIndex("UserId", "OrganizationUnitId"); + + b.ToTable("AbpUserOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("RoleId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId", "UserId"); + + b.ToTable("AbpUserRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasColumnType("text"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(95) + .HasColumnType("character varying(95)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsPeis") + .HasMaxLength(1) + .HasColumnType("character varying(1)"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code"); + + b.HasIndex("ParentId"); + + b.ToTable("AbpOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uuid"); + + b.Property("RoleId") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "RoleId"); + + b.HasIndex("RoleId", "OrganizationUnitId"); + + b.ToTable("AbpOrganizationUnitRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ClientId") + .HasMaxLength(100) + .HasColumnType("character varying(100)"); + + b.Property("ClientSecret") + .HasColumnType("text"); + + b.Property("ClientUri") + .HasColumnType("text"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConsentType") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .HasColumnType("text"); + + b.Property("DisplayNames") + .HasColumnType("text"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LogoUri") + .HasColumnType("text"); + + b.Property("Permissions") + .HasColumnType("text"); + + b.Property("PostLogoutRedirectUris") + .HasColumnType("text"); + + b.Property("Properties") + .HasColumnType("text"); + + b.Property("RedirectUris") + .HasColumnType("text"); + + b.Property("Requirements") + .HasColumnType("text"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("OpenIddictApplications", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ApplicationId") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("timestamp without time zone"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Properties") + .HasColumnType("text"); + + b.Property("Scopes") + .HasColumnType("text"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("character varying(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictAuthorizations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Scopes.OpenIddictScope", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("text"); + + b.Property("Descriptions") + .HasColumnType("text"); + + b.Property("DisplayName") + .HasColumnType("text"); + + b.Property("DisplayNames") + .HasColumnType("text"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(200) + .HasColumnType("character varying(200)"); + + b.Property("Properties") + .HasColumnType("text"); + + b.Property("Resources") + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("OpenIddictScopes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ApplicationId") + .HasColumnType("uuid"); + + b.Property("AuthorizationId") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("timestamp without time zone"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExpirationDate") + .HasColumnType("timestamp without time zone"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Payload") + .HasColumnType("text"); + + b.Property("Properties") + .HasColumnType("text"); + + b.Property("RedemptionDate") + .HasColumnType("timestamp without time zone"); + + b.Property("ReferenceId") + .HasMaxLength(100) + .HasColumnType("character varying(100)"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("character varying(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.HasKey("Id"); + + b.HasIndex("AuthorizationId"); + + b.HasIndex("ReferenceId"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpPermissionGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("character varying(2048)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpSettings", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("AbpTenants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("uuid"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.HasKey("TenantId", "Name"); + + b.ToTable("AbpTenantConnectionStrings", (string)null); + }); + + modelBuilder.Entity("ChildDiagnosis", b => + { + b.HasOne("Shentun.Peis.Models.Diagnosis", null) + .WithMany() + .HasForeignKey("DiagnosisId") + .IsRequired() + .HasConstraintName("fk_child_diagnosis_diagnosis1"); + + b.HasOne("Shentun.Peis.Models.Diagnosis", null) + .WithMany() + .HasForeignKey("ParentDiagnosisId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_child_diagnosis_diagnosis"); + }); + + modelBuilder.Entity("RoomAsbitem", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", null) + .WithMany() + .HasForeignKey("AsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_room_asbitem_asbitem"); + + b.HasOne("Shentun.Peis.Models.Room", null) + .WithMany() + .HasForeignKey("RoomId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_room_asbitem_room"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.HelloA", b => + { + b.HasOne("Shentun.Peis.Books.HelloType", "HelloType") + .WithMany("HelloAs") + .HasForeignKey("HelloTypeId") + .IsRequired() + .HasConstraintName("fk_hello_a_hello_type"); + + b.Navigation("HelloType"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.TestB", b => + { + b.HasOne("Shentun.Peis.Books.TestA", "TestAs") + .WithMany("TestBs") + .HasForeignKey("TestAsAId"); + + b.Navigation("TestAs"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Asbitem", b => + { + b.HasOne("Shentun.Peis.Models.InvoiceItemType", "InvoiceItemType") + .WithMany("Asbitems") + .HasForeignKey("InvoiceItemTypeId") + .IsRequired() + .HasConstraintName("fk_asbitem_invoice_item_type"); + + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("Asbitems") + .HasForeignKey("ItemTypeId") + .IsRequired() + .HasConstraintName("fk_asbitem_item_type"); + + b.Navigation("InvoiceItemType"); + + b.Navigation("ItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.AsbitemDetail", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithMany("AsbitemDetails") + .HasForeignKey("AsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_asbitem_detail_asbitem"); + + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("AsbitemDetails") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_asbitem_detail_item"); + + b.Navigation("Asbitem"); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultConclusion", b => + { + b.HasOne("Shentun.Peis.Models.BigtextResultTemplate", "BigtextResultTemplate") + .WithMany("BigtextResultConclusions") + .HasForeignKey("BigtextResultTemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_bigtext"); + + b.Navigation("BigtextResultTemplate"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultDescription", b => + { + b.HasOne("Shentun.Peis.Models.BigtextResultTemplate", "BigtextResultTemplate") + .WithMany("BigtextResultDescriptions") + .HasForeignKey("BigtextResultTemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_bigtext"); + + b.Navigation("BigtextResultTemplate"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultTemplate", b => + { + b.HasOne("Shentun.Peis.Models.BigtextResultType", "BigtextResultType") + .WithMany("BigtextResultTemplates") + .HasForeignKey("BigtextResultTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_bigtext"); + + b.Navigation("BigtextResultType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultType", b => + { + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("BigtextResultTypes") + .HasForeignKey("ItemTypeId") + .IsRequired() + .HasConstraintName("fk_bigtext"); + + b.Navigation("ItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardBill", b => + { + b.HasOne("Shentun.Peis.Models.CardRegister", "CardRegister") + .WithMany("CardBills") + .HasForeignKey("CardRegisterId") + .IsRequired() + .HasConstraintName("fk_card_bil_reference_card_reg"); + + b.HasOne("Shentun.Peis.Models.PayMode", "PayMode") + .WithMany("CardBills") + .HasForeignKey("PayModeId") + .HasConstraintName("fk_card_bill_payment_mode"); + + b.Navigation("CardRegister"); + + b.Navigation("PayMode"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardRegister", b => + { + b.HasOne("Shentun.Peis.Models.CardType", "CardType") + .WithMany("CardRegisters") + .HasForeignKey("CardTypeId") + .IsRequired() + .HasConstraintName("fk_card_reg_reference_card_typ"); + + b.HasOne("Shentun.Peis.Models.Department", "OrganizationUnit") + .WithMany("CardRegisters") + .HasForeignKey("OrganizationUnitId") + .IsRequired() + .HasConstraintName("fk_card_register_department"); + + b.Navigation("CardType"); + + b.Navigation("OrganizationUnit"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Charge", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("Charges") + .HasForeignKey("PatientRegisterId") + .IsRequired() + .HasConstraintName("fk_patient_register_charge"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeAsbitem", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithMany("ChargeAsbitems") + .HasForeignKey("AsbitemId") + .IsRequired() + .HasConstraintName("fk_charge_asbitem_asbitem"); + + b.HasOne("Shentun.Peis.Models.Charge", "Charge") + .WithMany("ChargeAsbitems") + .HasForeignKey("ChargeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_charge_asbitem_charge"); + + b.Navigation("Asbitem"); + + b.Navigation("Charge"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeBack", b => + { + b.HasOne("Shentun.Peis.Models.Charge", "Charge") + .WithMany("ChargeBacks") + .HasForeignKey("ChargeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_bill_bac_reference_bill"); + + b.Navigation("Charge"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeBackPay", b => + { + b.HasOne("Shentun.Peis.Models.ChargeBack", "ChargeBack") + .WithMany("ChargeBackPays") + .HasForeignKey("ChargeBackId") + .IsRequired() + .HasConstraintName("fk_charge_back_pay_charge_back"); + + b.HasOne("Shentun.Peis.Models.PayMode", "PayMode") + .WithMany("ChargeBackPays") + .HasForeignKey("PayModeId") + .IsRequired() + .HasConstraintName("fk_charge_back_pay_pay_mode"); + + b.Navigation("ChargeBack"); + + b.Navigation("PayMode"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargePay", b => + { + b.HasOne("Shentun.Peis.Models.Charge", "Charge") + .WithMany("ChargePays") + .HasForeignKey("ChargeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_charge_payment_mode_charge"); + + b.HasOne("Shentun.Peis.Models.PayMode", "PayMode") + .WithMany("ChargePays") + .HasForeignKey("PayModeId") + .IsRequired() + .HasConstraintName("fk_charge_"); + + b.Navigation("Charge"); + + b.Navigation("PayMode"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargePriceItem", b => + { + b.HasOne("Shentun.Peis.Models.ChargeAsbitem", "ChargeAsbitem") + .WithMany("ChargePriceItems") + .HasForeignKey("ChargeAsbitemId") + .IsRequired() + .HasConstraintName("fk_charge_asbitem"); + + b.Navigation("ChargeAsbitem"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CommonChar", b => + { + b.HasOne("Shentun.Peis.Models.CommonCharType", "CommonCharType") + .WithMany("CommonChars") + .HasForeignKey("CommonCharTypeId") + .IsRequired() + .HasConstraintName("fk_common_char_common_char_type"); + + b.Navigation("CommonCharType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ContactMethod", b => + { + b.HasOne("Shentun.Peis.Models.ContactPerson", "ContactPerson") + .WithMany("ContactMethods") + .HasForeignKey("ContactPersonId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_contact_method_contact"); + + b.Navigation("ContactPerson"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ContactPerson", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrg", "CustomerOrg") + .WithMany("ContactPeople") + .HasForeignKey("CustomerOrgId") + .IsRequired() + .HasConstraintName("fk_contact_org"); + + b.Navigation("CustomerOrg"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CriticalValue", b => + { + b.HasOne("Shentun.Peis.Models.CriticalValueType", "CriticalValueType") + .WithMany("CriticalValues") + .HasForeignKey("CriticalValueTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_critica"); + + b.Navigation("CriticalValueType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgCharge", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgRegister", "CustomerOrgRegister") + .WithMany("CustomerOrgCharges") + .HasForeignKey("CustomerOrgRegisterId") + .IsRequired() + .HasConstraintName("fk_customer_org_charge_register"); + + b.Navigation("CustomerOrgRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargeBack", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgCharge", "CustomerOrgCharge") + .WithMany("CustomerOrgChargeBacks") + .HasForeignKey("CustomerOrgChargeId") + .IsRequired() + .HasConstraintName("fk_org_charge_back_org_charge"); + + b.Navigation("CustomerOrgCharge"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargeBackPay", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgChargeBack", "CustomerOrgChargeBack") + .WithMany("CustomerOrgChargeBackPays") + .HasForeignKey("CustomerOrgChargeBackId") + .IsRequired() + .HasConstraintName("fk_org_cha"); + + b.HasOne("Shentun.Peis.Models.PayMode", "PayMode") + .WithMany("CustomerOrgChargeBackPays") + .HasForeignKey("PayModeId") + .IsRequired() + .HasConstraintName("fk_org_charge_back_pay_pay_mode"); + + b.Navigation("CustomerOrgChargeBack"); + + b.Navigation("PayMode"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargePay", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgCharge", "CustomerOrgCharge") + .WithOne("CustomerOrgChargePay") + .HasForeignKey("Shentun.Peis.Models.CustomerOrgChargePay", "Id") + .IsRequired() + .HasConstraintName("fk_org_charge_pay_org_charge"); + + b.HasOne("Shentun.Peis.Models.PayMode", "PayMode") + .WithMany("CustomerOrgChargePays") + .HasForeignKey("PayModeId") + .HasConstraintName("fk_org_charge_pay_pay_mode"); + + b.Navigation("CustomerOrgCharge"); + + b.Navigation("PayMode"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgGroup", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgRegister", "CustomerOrgRegister") + .WithMany("CustomerOrgGroups") + .HasForeignKey("CustomerOrgRegisterId") + .IsRequired() + .HasConstraintName("fk_customer_org_group_register"); + + b.Navigation("CustomerOrgRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgGroupDetail", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithMany("CustomerOrgGroupDetails") + .HasForeignKey("AsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_org_group_detail_asbitem"); + + b.HasOne("Shentun.Peis.Models.CustomerOrgGroup", "CustomerOrgGroup") + .WithMany("CustomerOrgGroupDetails") + .HasForeignKey("CustomerOrgGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_org_group_detail_org_group"); + + b.Navigation("Asbitem"); + + b.Navigation("CustomerOrgGroup"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgRegister", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrg", "CustomerOrg") + .WithMany("CustomerOrgRegisters") + .HasForeignKey("CustomerOrgId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_org_medi_reference_org"); + + b.Navigation("CustomerOrg"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Diagnosis", b => + { + b.HasOne("Shentun.Peis.Models.DiagnosisLevel", "DiagnosisLevel") + .WithMany("Diagnoses") + .HasForeignKey("DiagnosisLevelId") + .IsRequired() + .HasConstraintName("fk_diagnosis_diagnosis_level"); + + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("Diagnoses") + .HasForeignKey("ItemTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_diagnosis_item_type"); + + b.Navigation("DiagnosisLevel"); + + b.Navigation("ItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisTemplateDetail", b => + { + b.HasOne("Shentun.Peis.Models.Diagnosis", "Diagnosis") + .WithMany("DiagnosisTemplateDetails") + .HasForeignKey("DiagnosisId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_diagnos"); + + b.HasOne("Shentun.Peis.Models.DiagnosisTemplate", "DiagnosisTemplate") + .WithMany("DiagnosisTemplateDetails") + .HasForeignKey("DiagnosisTemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_diagno2"); + + b.Navigation("Diagnosis"); + + b.Navigation("DiagnosisTemplate"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.HealthCertificate", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithOne("HealthCertificate") + .HasForeignKey("Shentun.Peis.Models.HealthCertificate", "Id") + .IsRequired() + .HasConstraintName("fk_health_"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Item", b => + { + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("Items") + .HasForeignKey("ItemTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_item_type"); + + b.Navigation("ItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultMatch", b => + { + b.HasOne("Shentun.Peis.Models.Diagnosis", "Diagnosis") + .WithMany("ItemResultMatches") + .HasForeignKey("DiagnosisId") + .IsRequired() + .HasConstraintName("fk_item_result_match_diagnosis"); + + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("ItemResultMatches") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_res_reference_item1"); + + b.Navigation("Diagnosis"); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultTemplate", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("ItemResultTemplates") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_res_reference_item"); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultTemplateType", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("ItemResultTemplateTypes") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_re"); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemTemplateDetail", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("ItemTemplateDetails") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_template_detail_item"); + + b.HasOne("Shentun.Peis.Models.ItemTemplate", "ItemTemplate") + .WithMany("ItemTemplateDetails") + .HasForeignKey("ItemTemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_te"); + + b.Navigation("Item"); + + b.Navigation("ItemTemplate"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemType", b => + { + b.HasOne("Shentun.Peis.Models.GuideType", "GuidType") + .WithMany("ItemTypes") + .HasForeignKey("GuidTypeId") + .IsRequired() + .HasConstraintName("fk_item_type_guide_type"); + + b.HasOne("Shentun.Peis.Models.MedicalReportType", "MedicalReportType") + .WithMany("ItemTypes") + .HasForeignKey("MedicalReportTypeId") + .IsRequired() + .HasConstraintName("fk_item_ty"); + + b.Navigation("GuidType"); + + b.Navigation("MedicalReportType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.LisRequest", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("LisRequests") + .HasForeignKey("PatientRegisterId") + .IsRequired() + .HasConstraintName("fk_lis_request_patient_register"); + + b.HasOne("Shentun.Peis.Models.SampleContainer", "SampleContainer") + .WithMany("LisRequests") + .HasForeignKey("SampleContainerId") + .IsRequired() + .HasConstraintName("fk_lis_request_sample_container"); + + b.HasOne("Shentun.Peis.Models.SampleType", "SampleType") + .WithMany("LisRequests") + .HasForeignKey("SampleTypeId") + .IsRequired() + .HasConstraintName("fk_lis_request_sample_type"); + + b.Navigation("PatientRegister"); + + b.Navigation("SampleContainer"); + + b.Navigation("SampleType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalConclusion", b => + { + b.HasOne("Shentun.Peis.Models.MedicalConclusionType", "MedicalConclusionType") + .WithMany("MedicalConclusions") + .HasForeignKey("MedicalConclusionTypeId") + .HasConstraintName("fk_medical"); + + b.Navigation("MedicalConclusionType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalPackageDetail", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithMany("MedicalPackageDetails") + .HasForeignKey("AsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_medical"); + + b.HasOne("Shentun.Peis.Models.MedicalPackage", "MedicalPackage") + .WithMany("MedicalPackageDetails") + .HasForeignKey("MedicalPackageId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_medica2"); + + b.Navigation("Asbitem"); + + b.Navigation("MedicalPackage"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.OrganizationUnitsCustomerOrg", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrg", "CustomerOrg") + .WithMany("OrganizationUnitsCustomerOrgs") + .HasForeignKey("CustomerOrgId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_medical_center_org_org"); + + b.HasOne("Shentun.Peis.Models.Department", "OrganizationUnit") + .WithMany("OrganizationUnitsCustomerOrgs") + .HasForeignKey("OrganizationUnitId") + .IsRequired() + .HasConstraintName("fk_medical"); + + b.Navigation("CustomerOrg"); + + b.Navigation("OrganizationUnit"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientOccupationalDisease", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithOne("PatientOccupationalDisease") + .HasForeignKey("Shentun.Peis.Models.PatientOccupationalDisease", "Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_patient"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientOccupationalHistory", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("PatientOccupationalHistories") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_occupat"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientPoison", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("PatientPoisons") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_patient"); + + b.HasOne("Shentun.Peis.Models.Poison", "Poison") + .WithMany("PatientPoisons") + .HasForeignKey("PoisonId") + .IsRequired() + .HasConstraintName("fk_patient_poison_poison"); + + b.Navigation("PatientRegister"); + + b.Navigation("Poison"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientRegister", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgRegister", "CustomerOrgRegister") + .WithMany("PatientRegisters") + .HasForeignKey("CustomerOrgRegisterId") + .IsRequired() + .HasConstraintName("fk_patient_register_org_register"); + + b.HasOne("Shentun.Peis.Models.MaritalStatus", "MaritalStatus") + .WithMany("PatientRegisters") + .HasForeignKey("MaritalStatusId") + .IsRequired() + .HasConstraintName("fk_patient_register_marital_status_id"); + + b.Navigation("CustomerOrgRegister"); + + b.Navigation("MaritalStatus"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientSymptom", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("PatientSymptoms") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_patient"); + + b.HasOne("Shentun.Peis.Models.Symptom", "Symptom") + .WithMany("PatientSymptoms") + .HasForeignKey("SymptomId") + .IsRequired() + .HasConstraintName("fk_patient_symptom_symptom"); + + b.Navigation("PatientRegister"); + + b.Navigation("Symptom"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PhoneFollow", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("PhoneFollows") + .HasForeignKey("PatientRegisterId") + .IsRequired() + .HasConstraintName("fk_phone_f"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Poison", b => + { + b.HasOne("Shentun.Peis.Models.PoisonType", "PoisonType") + .WithMany("Poisons") + .HasForeignKey("PoisonTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_poison_poison_type"); + + b.Navigation("PoisonType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PriceItem", b => + { + b.HasOne("Shentun.Peis.Models.InvoiceItemType", "InvoiceItemType") + .WithMany("PriceItems") + .HasForeignKey("InvoiceItemTypeId") + .IsRequired() + .HasConstraintName("fk_price_item_invoice_item_type"); + + b.Navigation("InvoiceItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.QueueRegister", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("QueueRegisters") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_queue_r"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ReferenceRange", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("ReferenceRanges") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_referenc_reference_item"); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterAsbitem", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithMany("RegisterAsbitems") + .HasForeignKey("AsbitemId") + .IsRequired() + .HasConstraintName("fk_register_reference_asbitem"); + + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("RegisterAsbitems") + .HasForeignKey("PatientRegisterId") + .IsRequired() + .HasConstraintName("fk_register_reference_patient_"); + + b.HasOne("Shentun.Peis.Models.RegisterCheck", "RegisterCheck") + .WithMany("RegisterAsbitems") + .HasForeignKey("RegisterCheckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_registe"); + + b.Navigation("Asbitem"); + + b.Navigation("PatientRegister"); + + b.Navigation("RegisterCheck"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckItem", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("RegisterCheckItems") + .HasForeignKey("ItemId") + .IsRequired() + .HasConstraintName("fk_register_reference_item"); + + b.HasOne("Shentun.Peis.Models.RegisterCheck", "RegisterCheck") + .WithMany("RegisterCheckItems") + .HasForeignKey("RegisterCheckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_register_item_register_check"); + + b.HasOne("Shentun.Peis.Models.ResultStatus", "ResultStatus") + .WithMany("RegisterCheckItems") + .HasForeignKey("ResultStatusId") + .HasConstraintName("fk_register_item_result_status"); + + b.Navigation("Item"); + + b.Navigation("RegisterCheck"); + + b.Navigation("ResultStatus"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckPicture", b => + { + b.HasOne("Shentun.Peis.Models.RegisterCheck", "RegisterCheck") + .WithMany("RegisterCheckPictures") + .HasForeignKey("RegisterCheckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_check_picture_register_check"); + + b.Navigation("RegisterCheck"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckSuggestion", b => + { + b.HasOne("Shentun.Peis.Models.RegisterCheck", "RegisterCheck") + .WithMany("RegisterCheckSuggestions") + .HasForeignKey("RegisterCheckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_registe"); + + b.Navigation("RegisterCheck"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckSummary", b => + { + b.HasOne("Shentun.Peis.Models.RegisterCheck", "RegisterCheck") + .WithMany("RegisterCheckSummaries") + .HasForeignKey("RegisterCheckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_registe"); + + b.Navigation("RegisterCheck"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Room", b => + { + b.HasOne("Shentun.Peis.Models.Department", "Department") + .WithMany("Rooms") + .HasForeignKey("DepartmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_room_department"); + + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("Rooms") + .HasForeignKey("ItemTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_room_item_type"); + + b.Navigation("Department"); + + b.Navigation("ItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleGroup", b => + { + b.HasOne("Shentun.Peis.Models.SampleContainer", "SampleContainer") + .WithMany("SampleGroups") + .HasForeignKey("SampleContainerId") + .IsRequired() + .HasConstraintName("fk_sample_"); + + b.HasOne("Shentun.Peis.Models.SampleType", "SampleType") + .WithMany("SampleGroups") + .HasForeignKey("SampleTypeId") + .IsRequired() + .HasConstraintName("fk_sample_group_sample_type"); + + b.Navigation("SampleContainer"); + + b.Navigation("SampleType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleGroupDetail", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithOne("SampleGroupDetail") + .HasForeignKey("Shentun.Peis.Models.SampleGroupDetail", "AsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sample_group_detail_asbitem"); + + b.HasOne("Shentun.Peis.Models.SampleGroup", "SampleGroup") + .WithMany("SampleGroupDetails") + .HasForeignKey("SampleGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sample_"); + + b.Navigation("Asbitem"); + + b.Navigation("SampleGroup"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ServiceTrade", b => + { + b.HasOne("Shentun.Peis.Models.Department", "Department") + .WithMany("ServiceTrades") + .HasForeignKey("DepartmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_service_trades_department"); + + b.Navigation("Department"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SexHormoneReferenceRange", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("SexHormoneReferenceRanges") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sex_hor"); + + b.HasOne("Shentun.Peis.Models.SexHormoneTerm", "SexHormoneTerm") + .WithMany("SexHormoneReferenceRanges") + .HasForeignKey("SexHormoneTermId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sex_ho2"); + + b.Navigation("Item"); + + b.Navigation("SexHormoneTerm"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Suggestion", b => + { + b.HasOne("Shentun.Peis.Models.Diagnosis", "Diagnosis") + .WithMany("Suggestions") + .HasForeignKey("DiagnosisId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_suggestion_diagnosis"); + + b.Navigation("Diagnosis"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumDiagnosis", b => + { + b.HasOne("Shentun.Peis.Models.Diagnosis", "Diagnosis") + .WithMany("SumDiagnoses") + .HasForeignKey("DiagnosisId") + .IsRequired() + .HasConstraintName("fk_sum_diagnosis_diagnosis"); + + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("SumDiagnoses") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sum_dia"); + + b.Navigation("Diagnosis"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSuggestionContent", b => + { + b.HasOne("Shentun.Peis.Models.SumSuggestionHeader", "SumSuggestionHeader") + .WithMany("SumSuggestionContents") + .HasForeignKey("SumSuggestionHeaderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sum_sug"); + + b.Navigation("SumSuggestionHeader"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSuggestionHeader", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("SumSuggestionHeaders") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sum_sug"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSummaryContent", b => + { + b.HasOne("Shentun.Peis.Models.SumSummaryHeader", "SumSummaryHeader") + .WithMany("SumSummaryContents") + .HasForeignKey("SumSummaryHeaderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sum_sum"); + + b.Navigation("SumSummaryHeader"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSummaryHeader", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("SumSummaryHeaders") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sum_sum"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParm", b => + { + b.HasOne("Shentun.Peis.Models.SysParmType", "SysParmType") + .WithMany("SysParms") + .HasForeignKey("SysParmTypeId") + .HasConstraintName("fk_sys_parm_sys_parm_type"); + + b.Navigation("SysParmType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmValue", b => + { + b.HasOne("Shentun.Peis.Models.SysParm", "SysParm") + .WithMany("SysParmValues") + .HasForeignKey("SysParmId") + .IsRequired() + .HasConstraintName("fk_sys_parm_value_sys_parm"); + + b.Navigation("SysParm"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmValueOption", b => + { + b.HasOne("Shentun.Peis.Models.SysParm", "SysParm") + .WithMany("SysParmValueOptions") + .HasForeignKey("SysParmId") + .IsRequired() + .HasConstraintName("fk_sys_par"); + + b.Navigation("SysParm"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.User", b => + { + b.HasOne("Shentun.Peis.Models.Department", "Department") + .WithMany("Users") + .HasForeignKey("DepartmentId") + .IsRequired() + .HasConstraintName("fk_user_department"); + + b.Navigation("Department"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserDepartment", b => + { + b.HasOne("Shentun.Peis.Models.Department", "Department") + .WithMany("UserDepartments") + .HasForeignKey("DepartmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_op"); + + b.HasOne("Shentun.Peis.Models.User", "User") + .WithMany("UserDepartments") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_o2"); + + b.Navigation("Department"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserGrouping", b => + { + b.HasOne("Shentun.Peis.Models.Grouping", "Grouping") + .WithMany("UserGroupings") + .HasForeignKey("GroupingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_grouping_grouping"); + + b.HasOne("Shentun.Peis.Models.User", "User") + .WithMany("UserGroupings") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_grouping_users"); + + b.Navigation("Grouping"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserItemType", b => + { + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("UserItemTypes") + .HasForeignKey("ItemTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_item_type_item_type"); + + b.HasOne("Shentun.Peis.Models.User", "User") + .WithMany("UserItemTypes") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_item_type_users"); + + b.Navigation("ItemType"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("Actions") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("EntityChanges") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.EntityChange", null) + .WithMany("PropertyChanges") + .HasForeignKey("EntityChangeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany("Claims") + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Claims") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Logins") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("OrganizationUnits") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Roles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Tokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("ParentId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany("Roles") + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + + b.HasOne("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", null) + .WithMany() + .HasForeignKey("AuthorizationId"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.HasOne("Volo.Abp.TenantManagement.Tenant", null) + .WithMany("ConnectionStrings") + .HasForeignKey("TenantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Shentun.Peis.Books.HelloType", b => + { + b.Navigation("HelloAs"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.TestA", b => + { + b.Navigation("TestBs"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Asbitem", b => + { + b.Navigation("AsbitemDetails"); + + b.Navigation("ChargeAsbitems"); + + b.Navigation("CustomerOrgGroupDetails"); + + b.Navigation("MedicalPackageDetails"); + + b.Navigation("RegisterAsbitems"); + + b.Navigation("SampleGroupDetail"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultTemplate", b => + { + b.Navigation("BigtextResultConclusions"); + + b.Navigation("BigtextResultDescriptions"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultType", b => + { + b.Navigation("BigtextResultTemplates"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardRegister", b => + { + b.Navigation("CardBills"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardType", b => + { + b.Navigation("CardRegisters"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Charge", b => + { + b.Navigation("ChargeAsbitems"); + + b.Navigation("ChargeBacks"); + + b.Navigation("ChargePays"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeAsbitem", b => + { + b.Navigation("ChargePriceItems"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeBack", b => + { + b.Navigation("ChargeBackPays"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CommonCharType", b => + { + b.Navigation("CommonChars"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ContactPerson", b => + { + b.Navigation("ContactMethods"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CriticalValueType", b => + { + b.Navigation("CriticalValues"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrg", b => + { + b.Navigation("ContactPeople"); + + b.Navigation("CustomerOrgRegisters"); + + b.Navigation("OrganizationUnitsCustomerOrgs"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgCharge", b => + { + b.Navigation("CustomerOrgChargeBacks"); + + b.Navigation("CustomerOrgChargePay"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargeBack", b => + { + b.Navigation("CustomerOrgChargeBackPays"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgGroup", b => + { + b.Navigation("CustomerOrgGroupDetails"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgRegister", b => + { + b.Navigation("CustomerOrgCharges"); + + b.Navigation("CustomerOrgGroups"); + + b.Navigation("PatientRegisters"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Department", b => + { + b.Navigation("CardRegisters"); + + b.Navigation("OrganizationUnitsCustomerOrgs"); + + b.Navigation("Rooms"); + + b.Navigation("ServiceTrades"); + + b.Navigation("UserDepartments"); + + b.Navigation("Users"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Diagnosis", b => + { + b.Navigation("DiagnosisTemplateDetails"); + + b.Navigation("ItemResultMatches"); + + b.Navigation("Suggestions"); + + b.Navigation("SumDiagnoses"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisLevel", b => + { + b.Navigation("Diagnoses"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisTemplate", b => + { + b.Navigation("DiagnosisTemplateDetails"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Grouping", b => + { + b.Navigation("UserGroupings"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.GuideType", b => + { + b.Navigation("ItemTypes"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.InvoiceItemType", b => + { + b.Navigation("Asbitems"); + + b.Navigation("PriceItems"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Item", b => + { + b.Navigation("AsbitemDetails"); + + b.Navigation("ItemResultMatches"); + + b.Navigation("ItemResultTemplateTypes"); + + b.Navigation("ItemResultTemplates"); + + b.Navigation("ItemTemplateDetails"); + + b.Navigation("ReferenceRanges"); + + b.Navigation("RegisterCheckItems"); + + b.Navigation("SexHormoneReferenceRanges"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemTemplate", b => + { + b.Navigation("ItemTemplateDetails"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemType", b => + { + b.Navigation("Asbitems"); + + b.Navigation("BigtextResultTypes"); + + b.Navigation("Diagnoses"); + + b.Navigation("Items"); + + b.Navigation("Rooms"); + + b.Navigation("UserItemTypes"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MaritalStatus", b => + { + b.Navigation("PatientRegisters"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalConclusionType", b => + { + b.Navigation("MedicalConclusions"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalPackage", b => + { + b.Navigation("MedicalPackageDetails"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalReportType", b => + { + b.Navigation("ItemTypes"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientRegister", b => + { + b.Navigation("Charges"); + + b.Navigation("HealthCertificate"); + + b.Navigation("LisRequests"); + + b.Navigation("PatientOccupationalDisease"); + + b.Navigation("PatientOccupationalHistories"); + + b.Navigation("PatientPoisons"); + + b.Navigation("PatientSymptoms"); + + b.Navigation("PhoneFollows"); + + b.Navigation("QueueRegisters"); + + b.Navigation("RegisterAsbitems"); + + b.Navigation("SumDiagnoses"); + + b.Navigation("SumSuggestionHeaders"); + + b.Navigation("SumSummaryHeaders"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PayMode", b => + { + b.Navigation("CardBills"); + + b.Navigation("ChargeBackPays"); + + b.Navigation("ChargePays"); + + b.Navigation("CustomerOrgChargeBackPays"); + + b.Navigation("CustomerOrgChargePays"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Poison", b => + { + b.Navigation("PatientPoisons"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PoisonType", b => + { + b.Navigation("Poisons"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheck", b => + { + b.Navigation("RegisterAsbitems"); + + b.Navigation("RegisterCheckItems"); + + b.Navigation("RegisterCheckPictures"); + + b.Navigation("RegisterCheckSuggestions"); + + b.Navigation("RegisterCheckSummaries"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ResultStatus", b => + { + b.Navigation("RegisterCheckItems"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleContainer", b => + { + b.Navigation("LisRequests"); + + b.Navigation("SampleGroups"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleGroup", b => + { + b.Navigation("SampleGroupDetails"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleType", b => + { + b.Navigation("LisRequests"); + + b.Navigation("SampleGroups"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SexHormoneTerm", b => + { + b.Navigation("SexHormoneReferenceRanges"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSuggestionHeader", b => + { + b.Navigation("SumSuggestionContents"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSummaryHeader", b => + { + b.Navigation("SumSummaryContents"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Symptom", b => + { + b.Navigation("PatientSymptoms"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParm", b => + { + b.Navigation("SysParmValueOptions"); + + b.Navigation("SysParmValues"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmType", b => + { + b.Navigation("SysParms"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.User", b => + { + b.Navigation("UserDepartments"); + + b.Navigation("UserGroupings"); + + b.Navigation("UserItemTypes"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Navigation("Actions"); + + b.Navigation("EntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Navigation("PropertyChanges"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Navigation("Claims"); + + b.Navigation("Logins"); + + b.Navigation("OrganizationUnits"); + + b.Navigation("Roles"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Navigation("Roles"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230625012649_i062503.cs b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230625012649_i062503.cs new file mode 100644 index 00000000..19710b29 --- /dev/null +++ b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230625012649_i062503.cs @@ -0,0 +1,39 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Shentun.Peis.Migrations +{ + public partial class i062503 : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "patient_no", + table: "patient", + type: "character varying(30)", + maxLength: 30, + nullable: true, + comment: "档案号", + oldClrType: typeof(string), + oldType: "character varying(30)", + oldMaxLength: 30, + oldNullable: true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "patient_no", + table: "patient", + type: "character varying(30)", + maxLength: 30, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(30)", + oldMaxLength: 30, + oldNullable: true, + oldComment: "档案号"); + } + } +} diff --git a/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230625015549_i062505_zhushi.Designer.cs b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230625015549_i062505_zhushi.Designer.cs new file mode 100644 index 00000000..a827a204 --- /dev/null +++ b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230625015549_i062505_zhushi.Designer.cs @@ -0,0 +1,11003 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; +using Shentun.Peis.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore; + +#nullable disable + +namespace Shentun.Peis.Migrations +{ + [DbContext(typeof(PeisDbContext))] + [Migration("20230625015549_i062505_zhushi")] + partial class i062505_zhushi + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.PostgreSql) + .HasAnnotation("ProductVersion", "6.0.5") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("AsbitemRoom", b => + { + b.Property("AsbitemId") + .HasColumnType("uuid"); + + b.Property("RoomId") + .HasColumnType("uuid"); + + b.HasKey("AsbitemId", "RoomId"); + + b.ToTable("AsbitemRoom"); + }); + + modelBuilder.Entity("ChildDiagnosis", b => + { + b.Property("ParentDiagnosisId") + .HasMaxLength(8) + .HasColumnType("uuid") + .HasColumnName("parent_diagnosis_id") + .IsFixedLength(); + + b.Property("DiagnosisId") + .HasMaxLength(8) + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength(); + + b.HasKey("ParentDiagnosisId", "DiagnosisId") + .HasName("pk_child_diagnosis"); + + b.HasIndex("DiagnosisId"); + + b.ToTable("child_diagnosis", (string)null); + + b.HasComment("子诊断"); + }); + + modelBuilder.Entity("DiagnosisDiagnosis", b => + { + b.Property("DiagnosisId") + .HasColumnType("uuid"); + + b.Property("ParentDiagnosisId") + .HasColumnType("uuid"); + + b.HasKey("DiagnosisId", "ParentDiagnosisId"); + + b.ToTable("DiagnosisDiagnosis"); + }); + + modelBuilder.Entity("RoomAsbitem", b => + { + b.Property("RoomId") + .HasMaxLength(5) + .HasColumnType("uuid") + .HasColumnName("room_id") + .IsFixedLength(); + + b.Property("AsbitemId") + .HasMaxLength(6) + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength(); + + b.HasKey("RoomId", "AsbitemId") + .HasName("pk_room_asbitem"); + + b.HasIndex("AsbitemId"); + + b.ToTable("room_asbitem", (string)null); + + b.HasComment("房间包含组合项目设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.HelloA", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ADesc") + .HasColumnType("text") + .HasColumnName("a_desc"); + + b.Property("AName") + .ValueGeneratedOnAdd() + .HasColumnType("text") + .HasDefaultValue("默认值") + .HasColumnName("a_name"); + + b.Property("AddTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("add_time") + .HasDefaultValueSql("now()"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("HelloTypeId") + .HasColumnType("uuid") + .HasColumnName("hello_type_id"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("HelloTypeId"); + + b.ToTable("hello_a"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.HelloType", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("TypeName") + .HasColumnType("text") + .HasColumnName("type_name") + .HasComment("类型名称"); + + b.HasKey("Id"); + + b.ToTable("hello_type"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.Student", b => + { + b.Property("Sid") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .HasColumnName("sid"); + + b.Property("Cid") + .HasColumnType("text"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasColumnType("text"); + + b.Property("Uid") + .HasColumnType("uuid"); + + b.HasKey("Sid"); + + b.ToTable("student"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.TestA", b => + { + b.Property("AId") + .ValueGeneratedOnAdd() + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("AName") + .HasColumnType("text"); + + b.HasKey("AId"); + + b.ToTable("testa"); + + b.HasComment("组合项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.TestB", b => + { + b.Property("BId") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("AId") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("AName") + .HasColumnType("text"); + + b.Property("TestAsAId") + .HasColumnType("uuid"); + + b.HasKey("BId"); + + b.HasIndex("TestAsAId"); + + b.ToTable("testb"); + + b.HasComment("组合项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Asbitem", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("ClinicalMeaning") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("clinical_meaning") + .HasComment("临床意义"); + + b.Property("CreationTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DefaultResult") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("default_result") + .HasComment("默认结果"); + + b.Property("DeviceTypeId") + .HasColumnType("uuid") + .HasColumnName("device_type_id") + .IsFixedLength() + .HasComment("仪器类别"); + + b.Property("DiagnosisFunction") + .HasMaxLength(1000) + .HasColumnType("character varying(1000)") + .HasColumnName("diagnosis_function") + .HasComment("诊断函数"); + + b.Property("DisplayName") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar") + .HasComment("适用性别,M-男,F-女,A-全部"); + + b.Property("InvoiceItemTypeId") + .HasColumnType("uuid") + .HasColumnName("invoice_item_type_id") + .IsFixedLength() + .HasComment("发票类别"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active") + .HasComment("是启用"); + + b.Property("IsBeforeEat") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_before_eat") + .HasComment("餐前项目"); + + b.Property("IsCheck") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_check") + .HasComment("是检查项目"); + + b.Property("IsContinueProcess") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_continue_process") + .HasComment("诊断函数处理完毕后继续处理"); + + b.Property("IsDiagnosisFunction") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_diagnosis_function") + .HasComment("启用诊断函数"); + + b.Property("IsItemResultMerger") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_item_result_merger") + .HasComment("项目结果合并"); + + b.Property("IsPictureRotate") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_picture_rotate") + .HasComment("体检报告图片旋转90°"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength() + .HasComment("项目类别"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Price") + .HasPrecision(8, 2) + .HasColumnType("numeric(8,2)") + .HasColumnName("price") + .HasComment("价格"); + + b.Property("QueueTime") + .HasPrecision(3, 1) + .HasColumnType("numeric(3,1)") + .HasColumnName("queue_time") + .HasComment("候诊时间"); + + b.Property("ShortName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("short_name") + .HasComment("简称"); + + b.Property("SimpleCode") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("InvoiceItemTypeId"); + + b.HasIndex("ItemTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_asbitem") + .IsUnique(); + + b.ToTable("asbitem"); + + b.HasComment("组合项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.AsbitemDetail", b => + { + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength(); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编码"); + + b.HasKey("AsbitemId", "ItemId") + .HasName("pk_department_asbitem_detail"); + + b.HasIndex("ItemId"); + + b.ToTable("asbitem_detail"); + + b.HasComment("组合项目包含项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.AsbitemGuide", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id") + .IsFixedLength() + .HasComment("单位科室ID"); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength() + .HasComment("组合项目ID"); + + b.Property("ForSexId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasComment("适用性别ID"); + + b.Property("Guide") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("guide") + .HasComment("指引单内容"); + + b.HasKey("OrganizationUnitId", "AsbitemId", "ForSexId") + .HasName("pk_department_asbitem_guide"); + + b.ToTable("asbitem_guide"); + + b.HasComment("体检中心组和项目指引内容"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.AsbitemPriceItem", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("Amount") + .HasColumnType("smallint") + .HasColumnName("amount") + .HasComment("数量"); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength() + .HasComment("组合项目编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PriceItemId") + .HasColumnType("uuid") + .HasColumnName("price_item_id") + .IsFixedLength() + .HasComment("价表项目编码"); + + b.HasKey("Id"); + + b.ToTable("asbitem_price_item"); + + b.HasComment("组和项目包含价表项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultConclusion", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("BigtextResultTemplateId") + .HasColumnType("uuid") + .HasColumnName("bigtext_result_template_id") + .IsFixedLength(); + + b.Property("Conclusion") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("conclusion") + .HasComment("结论"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("BigtextResultTemplateId"); + + b.ToTable("bigtext_result_conclusion"); + + b.HasComment("大文本结果结论"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultDescription", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("BigtextResultTemplateId") + .HasColumnType("uuid") + .HasColumnName("bigtext_result_template_id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("description") + .HasComment("描述"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("BigtextResultTemplateId"); + + b.ToTable("bigtext_result_description"); + + b.HasComment("大文本结果描述"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("BigtextResultTypeId") + .HasColumnType("uuid") + .HasColumnName("bigtext_result_type_id") + .IsFixedLength() + .HasComment("结果类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("BigtextResultTypeId"); + + b.ToTable("bigtext_result_template"); + + b.HasComment("大文本结果模板"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength() + .HasComment("项目类别"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength() + .HasComment("父编号"); + + b.Property("PathCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("path_code") + .HasComment("路径编码"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("ItemTypeId"); + + b.ToTable("bigtext_result_type"); + + b.HasComment("大文本结果类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BirthPlace", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CountryCode") + .HasMaxLength(6) + .HasColumnType("character varying(6)") + .HasColumnName("country_code") + .HasComment("国家标准码"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_birth_place") + .IsUnique(); + + b.ToTable("birth_place"); + + b.HasComment("出生地"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardBill", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("编号"); + + b.Property("BillFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("bill_flag") + .HasDefaultValueSql("'0'::bpchar") + .HasComment("记账标志"); + + b.Property("BillMoney") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("bill_money") + .HasComment("记账金额"); + + b.Property("CardRegisterId") + .HasColumnType("uuid") + .HasColumnName("card_register_id") + .HasComment("卡登记编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PayModeId") + .ValueGeneratedOnAdd() + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("pay_mode_id") + .HasDefaultValueSql("'1'::bpchar") + .IsFixedLength() + .HasComment("支付方式"); + + b.HasKey("Id"); + + b.HasIndex("CardRegisterId"); + + b.HasIndex("PayModeId"); + + b.ToTable("card_bill"); + + b.HasComment("卡记账记录"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardRegister", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("编号"); + + b.Property("CardFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("card_flag") + .HasDefaultValueSql("0") + .HasComment("使用标志"); + + b.Property("CardNo") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("card_no") + .HasComment("卡号"); + + b.Property("CardPassword") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("card_password"); + + b.Property("CardTypeId") + .HasColumnType("uuid") + .HasColumnName("card_type_id") + .IsFixedLength() + .HasComment("卡类型"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("customer_name") + .HasComment("领用者"); + + b.Property("Discount") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("discount") + .HasDefaultValueSql("100") + .HasComment("折扣"); + + b.Property("ExpiryDate") + .HasColumnType("date") + .HasColumnName("expiry_date") + .HasComment("有效期"); + + b.Property("IdNo") + .HasMaxLength(18) + .HasColumnType("character varying(18)") + .HasColumnName("id_no") + .HasComment("身份证号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MobileTelephone") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("mobile_telephone") + .HasComment("手机"); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id") + .IsFixedLength(); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("Telephone") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("telephone") + .HasComment("电话"); + + b.HasKey("Id"); + + b.HasIndex("CardTypeId"); + + b.HasIndex("OrganizationUnitId"); + + b.HasIndex(new[] { "CardNo", "CardFlag" }, "ix_card_register") + .IsUnique(); + + b.ToTable("card_register"); + + b.HasComment("会员卡登记"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("CardModeId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("card_mode_id") + .HasDefaultValueSql("0") + .HasComment("卡模式"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("Discount") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("discount") + .HasDefaultValueSql("100") + .HasComment("折扣"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("ExpiryDay") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("expiry_day") + .HasDefaultValueSql("3650") + .HasComment("有效期"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark") + .HasComment("备注"); + + b.HasKey("Id"); + + b.ToTable("card_type"); + + b.HasComment("会员卡类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Charge", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("收据号"); + + b.Property("ChargeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("charge_flag") + .HasDefaultValueSql("0"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("InvoiceNo") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("invoice_no"); + + b.Property("InvoiceOrgName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("invoice_org_name"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("登记流水号"); + + b.Property("SettleAccountId") + .HasColumnType("uuid") + .HasColumnName("settle_account_id"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "PatientRegisterId" }, "fki_fk_patient_register_charge"); + + b.HasIndex(new[] { "PatientRegisterId" }, "ix_charge"); + + b.ToTable("charge"); + + b.HasComment("收费主档"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeAsbitem", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Amount") + .HasColumnType("smallint") + .HasColumnName("amount"); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength() + .HasComment("组合项目"); + + b.Property("ChargeId") + .HasColumnType("uuid") + .HasColumnName("charge_id") + .HasComment("收据号"); + + b.Property("ChargePrice") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_price") + .HasComment("价格"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("RegisterAsbitemId") + .HasColumnType("uuid") + .HasColumnName("register_asbitem_id"); + + b.HasKey("Id"); + + b.HasIndex("AsbitemId"); + + b.HasIndex("ChargeId"); + + b.ToTable("charge_asbitem"); + + b.HasComment("收费包含组合项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeBack", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("退费编号"); + + b.Property("ChargeId") + .HasColumnType("uuid") + .HasColumnName("charge_id") + .HasComment("收据号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SettleAccountId") + .HasColumnType("uuid") + .HasColumnName("settle_account_id") + .HasComment("结账ID"); + + b.HasKey("Id"); + + b.HasIndex("ChargeId"); + + b.ToTable("charge_back"); + + b.HasComment("退费主档"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeBackPay", b => + { + b.Property("ChargeBackId") + .HasColumnType("uuid") + .HasColumnName("charge_back_id"); + + b.Property("PayModeId") + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("pay_mode_id") + .IsFixedLength() + .HasComment("支付方式ID"); + + b.Property("BackMoeny") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("back_moeny") + .HasComment("退费金额"); + + b.HasKey("ChargeBackId", "PayModeId") + .HasName("pk_department_charge_back_pay"); + + b.HasIndex("PayModeId"); + + b.ToTable("charge_back_pay"); + + b.HasComment("退费支付方式"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargePay", b => + { + b.Property("ChargeId") + .HasColumnType("uuid") + .HasColumnName("charge_id") + .HasComment("收据号"); + + b.Property("PayModeId") + .ValueGeneratedOnAdd() + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("pay_mode_id") + .HasDefaultValueSql("'1'::bpchar") + .IsFixedLength() + .HasComment("支付方式"); + + b.Property("CardBillId") + .HasColumnType("uuid") + .HasColumnName("card_bill_id"); + + b.Property("ChargeMoney") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_money") + .HasComment("金额"); + + b.HasKey("ChargeId", "PayModeId") + .HasName("pk_department_charge_pay"); + + b.HasIndex("PayModeId"); + + b.ToTable("charge_pay"); + + b.HasComment("收费支付方式"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargePriceItem", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Amount") + .HasColumnType("smallint") + .HasColumnName("amount"); + + b.Property("ChargeAsbitemId") + .HasColumnType("uuid") + .HasColumnName("charge_asbitem_id"); + + b.Property("ChargePrice") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_price"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PriceItemId") + .HasColumnType("uuid") + .HasColumnName("price_item_id"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "ChargeAsbitemId" }, "fki_fk_charge_asbitem"); + + b.HasIndex(new[] { "ChargeAsbitemId", "PriceItemId" }, "ix_charge_price_item"); + + b.ToTable("charge_price_item"); + + b.HasComment("收费价表项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CommonChar", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CommonCharTypeId") + .HasColumnType("uuid") + .HasColumnName("common_char_type_id") + .IsFixedLength() + .HasComment("常用字符类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(1) + .HasColumnType("character varying(1)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(1) + .HasColumnType("character varying(1)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("CommonCharTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_common_char") + .IsUnique(); + + b.ToTable("common_char"); + + b.HasComment("常用字符"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CommonCharType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_common_char_type") + .IsUnique(); + + b.ToTable("common_char_type"); + + b.HasComment("常用字符类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ContactMethod", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ContactMethodType") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("contact_method_type") + .HasDefaultValueSql("'M'::bpchar") + .HasComment("联系方式类别-比如0-手机、1-电子邮箱"); + + b.Property("ContactMethodValue") + .HasMaxLength(15) + .HasColumnType("character varying(15)") + .HasColumnName("contact_method_value") + .HasComment("联系方式,比如18911254911,839860190@qq.com"); + + b.Property("ContactPersonId") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("ContactPersonId"); + + b.ToTable("contact_method"); + + b.HasComment("联系方式新增量主键,更新映射关系"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ContactPerson", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgId") + .HasColumnType("uuid") + .HasColumnName("customer_org_id") + .IsFixedLength() + .HasComment("客户单位编号"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("姓名"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("Title") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("title") + .HasComment("职务"); + + b.HasKey("Id"); + + b.HasIndex("CustomerOrgId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_contact"); + + b.HasIndex(new[] { "SimpleCode" }, "ix_contact_simple_code"); + + b.ToTable("contact_person"); + + b.HasComment("联系人"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CriticalValue", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CriticalValueTypeId") + .HasColumnType("uuid") + .HasColumnName("critical_value_type_id") + .IsFixedLength() + .HasComment("危急值类别编号"); + + b.Property("DisplayName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex("CriticalValueTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_critical_value") + .IsUnique(); + + b.ToTable("critical_value"); + + b.HasComment("危急值关键字设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CriticalValueType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength() + .HasComment("父编号"); + + b.Property("PathCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("path_code") + .HasComment("路径编码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_critical_value_type") + .IsUnique(); + + b.ToTable("critical_value_type"); + + b.HasComment("危急值类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrg", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("单位ID"); + + b.Property("Accounts") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("accounts") + .HasComment("银行帐号"); + + b.Property("Address") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("address") + .HasComment("联系地址"); + + b.Property("Bank") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("bank") + .HasComment("业务银行"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("单位名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("Fax") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("fax") + .HasComment("传真"); + + b.Property("InvoiceName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("invoice_name") + .HasComment("开票名称"); + + b.Property("IsLock") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_lock") + .HasComment("锁住"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OrgTypeId") + .HasColumnType("uuid") + .HasColumnName("org_type_id") + .IsFixedLength() + .HasComment("单位性质"); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength() + .HasComment("父编号"); + + b.Property("PathCode") + .HasMaxLength(60) + .HasColumnType("character varying(60)") + .HasColumnName("path_code") + .HasComment("路径编码"); + + b.Property("PostalCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("postal_code") + .HasComment("邮政编码"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("ShortName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("short_name") + .HasComment("简称"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code") + .HasComment("拼音简码"); + + b.Property("StatusFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("status_flag") + .HasDefaultValueSql("0") + .HasComment("状态"); + + b.Property("Telephone") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("telephone") + .HasComment("联系电话"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "OrganizationUnitId" }, "fki_fk_customer_org_organization_units"); + + b.HasIndex(new[] { "ParentId", "DisplayName" }, "ix_org") + .IsUnique(); + + b.ToTable("customer_org"); + + b.HasComment("团检单位设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgCharge", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ChargeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("charge_flag") + .HasComment("收退费标志"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgRegisterId") + .HasColumnType("uuid") + .HasColumnName("customer_org_register_id") + .HasComment("客户单位登记ID"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Payer") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("payer") + .HasComment("付款人"); + + b.Property("SettleAccountId") + .HasColumnType("uuid") + .HasColumnName("settle_account_id") + .HasComment("结算账户ID"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "CustomerOrgRegisterId" }, "fki_fk_customer_org_charge_register"); + + b.ToTable("customer_org_charge"); + + b.HasComment("团检单位收费"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargeBack", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgChargeId") + .HasColumnType("uuid") + .HasColumnName("customer_org_charge_id") + .HasComment("收费编号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SettleAccountId") + .HasColumnType("uuid") + .HasColumnName("settle_account_id") + .HasComment("结算账户ID"); + + b.HasKey("Id"); + + b.HasIndex("CustomerOrgChargeId"); + + b.ToTable("customer_org_charge_back"); + + b.HasComment("团检单位退费"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargeBackPay", b => + { + b.Property("CustomerOrgChargeBackId") + .HasColumnType("uuid") + .HasColumnName("customer_org_charge_back_id"); + + b.Property("PayModeId") + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("pay_mode_id") + .IsFixedLength() + .HasComment("支付方式"); + + b.Property("BackMoeny") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("back_moeny") + .HasComment("退费金额"); + + b.HasKey("CustomerOrgChargeBackId", "PayModeId") + .HasName("pk_org_charge_back_pay"); + + b.HasIndex("PayModeId"); + + b.ToTable("customer_org_charge_back_pay"); + + b.HasComment("团结退费支付方式"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargePay", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ChargeMoney") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_money") + .HasComment("支付金额"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PayModeId") + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("pay_mode_id") + .IsFixedLength() + .HasComment("支付方式"); + + b.HasKey("Id"); + + b.HasIndex("PayModeId"); + + b.ToTable("customer_org_charge_pay"); + + b.HasComment("团检收费支付方式"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgGroup", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("分组编号"); + + b.Property("AgeLowerLimit") + .HasColumnType("smallint") + .HasColumnName("age_lower_limit") + .HasComment("适用年龄下限"); + + b.Property("AgeUpperLimit") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasColumnName("age_upper_limit") + .HasDefaultValueSql("120") + .HasComment("适用年龄上限"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgRegisterId") + .HasColumnType("uuid") + .HasColumnName("customer_org_register_id"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("分组名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar") + .HasComment("适用性别"); + + b.Property("JobPost") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("job_post") + .HasComment("适用职务"); + + b.Property("JobTitle") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("job_title") + .HasComment("适用职称"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MaritalStatusId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("marital_status_id") + .HasComment("适用婚姻状况"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price") + .HasComment("价格"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark") + .HasComment("备注"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "CustomerOrgRegisterId" }, "fki_fk_customer_org_group_register"); + + b.ToTable("customer_org_group"); + + b.HasComment("团体分组主档"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgGroupDetail", b => + { + b.Property("CustomerOrgGroupId") + .HasColumnType("uuid") + .HasColumnName("customer_org_group_id") + .IsFixedLength() + .HasComment("分组编号"); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength() + .HasComment("组合项目编号"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price") + .HasComment("价格"); + + b.HasKey("CustomerOrgGroupId", "AsbitemId") + .HasName("pk_org_group_detail"); + + b.HasIndex("AsbitemId"); + + b.ToTable("customer_org_group_detail"); + + b.HasComment("团检分组包含组合项目"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgRegister", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("BeginTime") + .ValueGeneratedOnAdd() + .HasColumnType("date") + .HasColumnName("begin_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)") + .HasComment("开始日期"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgId") + .HasColumnType("uuid") + .HasColumnName("customer_org_id") + .IsFixedLength() + .HasComment("单位编号"); + + b.Property("EndTime") + .HasColumnType("date") + .HasColumnName("end_time") + .HasComment("结束日期"); + + b.Property("IsComplete") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_complete") + .HasComment("完成标志"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MedicalTimes") + .HasColumnType("smallint") + .HasColumnName("medical_times") + .HasComment("单位体检次数"); + + b.Property("RegisterName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("register_name") + .HasComment("计划名称"); + + b.Property("RegisterNo") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("register_no") + .HasComment("计划号"); + + b.HasKey("Id"); + + b.HasIndex("CustomerOrgId"); + + b.ToTable("customer_org_register"); + + b.HasComment("团检体检登记"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_org_type") + .IsUnique(); + + b.ToTable("customer_org_type"); + + b.HasComment("客户单位类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Department", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CodePrefix") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("code_prefix"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DepartmentTypeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("department_type_flag"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasMaxLength(4) + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength(); + + b.Property("PathCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("path_code"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName", "ParentId" }, "ix_department") + .IsUnique(); + + b.ToTable("department"); + + b.HasComment("部门,已经废弃"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DeviceType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("仪器类别编号"); + + b.Property("CheckTypeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("check_type_flag"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("仪器类别名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.ToTable("device_type"); + + b.HasComment("仪器类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Diagnosis", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DiagnosisLevelId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_level_id") + .HasComment("诊断级别"); + + b.Property("DisplayName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar") + .HasComment("适用性别"); + + b.Property("IsIll") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_ill") + .HasComment("是疾病"); + + b.Property("IsSummaryTemplate") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_summary_template") + .HasComment("是总检模板"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength() + .HasComment("项目类别"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("simple_code"); + + b.Property("SuggestionName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("suggestion_name") + .HasComment("建议名称"); + + b.HasKey("Id"); + + b.HasIndex("DiagnosisLevelId"); + + b.HasIndex("ItemTypeId"); + + b.ToTable("diagnosis"); + + b.HasComment("诊断设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisLevel", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.ToTable("diagnosis_level"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisPostfix", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_diagnosis_postfix") + .IsUnique(); + + b.ToTable("diagnosis_postfix"); + + b.HasComment("诊断后缀设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_diagnosis_template") + .IsUnique(); + + b.ToTable("diagnosis_template"); + + b.HasComment("诊断模板设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisTemplateDetail", b => + { + b.Property("DiagnosisTemplateId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_template_id") + .IsFixedLength() + .HasComment("诊断模板编号"); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength() + .HasComment("诊断编号"); + + b.HasKey("DiagnosisTemplateId", "DiagnosisId") + .HasName("pk_diagnosis_template_detail"); + + b.HasIndex("DiagnosisId"); + + b.ToTable("diagnosis_template_detail"); + + b.HasComment("诊断模板包含明细"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength() + .HasComment("父编号"); + + b.Property("PathCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("path_code") + .HasComment("路径编码"); + + b.HasKey("Id"); + + b.ToTable("diagnosis_type"); + + b.HasComment("诊断类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.FollowUpMode", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("smallint") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("follow_up_mode"); + + b.HasComment("随访方式"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.FollowUpPlan", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Content") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("content") + .HasComment("随访内容"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CycleDays") + .HasColumnType("smallint") + .HasColumnName("cycle_days") + .HasComment("周期天数"); + + b.Property("DoctorUserId") + .HasColumnType("uuid") + .HasColumnName("doctor_user_id") + .HasComment("医生"); + + b.Property("FollowUpModeId") + .HasColumnType("uuid") + .HasColumnName("follow_up_mode_id") + .IsFixedLength() + .HasComment("随访方式"); + + b.Property("FollowUpTypeId") + .HasColumnType("uuid") + .HasColumnName("follow_up_type_id") + .IsFixedLength() + .HasComment("随访类别"); + + b.Property("IsLoop") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_loop") + .HasComment("是否循环"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PerfomFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("perfom_flag") + .HasComment("执行标志"); + + b.Property("PerfomTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("perfom_time") + .HasComment("执行时间"); + + b.Property("PerfomUserId") + .HasColumnType("uuid") + .HasColumnName("perfom_user_id") + .HasComment("执行者用户ID"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark") + .HasComment("备注"); + + b.HasKey("Id"); + + b.ToTable("follow_up_plan"); + + b.HasComment("随访计划"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.FollowUpType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("smallint") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("follow_up_type"); + + b.HasComment("随访类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ForSex", b => + { + b.Property("Id") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("id"); + + b.Property("DisplayName") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("SimpleCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("for_sex"); + + b.HasComment("适用性别设置,固定编码"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Grouping", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ModifiedDate") + .HasColumnType("date") + .HasColumnName("modified_date"); + + b.Property("Modifier") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("modifier"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_grouping") + .IsUnique(); + + b.ToTable("grouping"); + + b.HasComment("废弃"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.GuideType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("guide_type"); + + b.HasComment("指引类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.HealthCertificate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("登记流水号"); + + b.Property("CertificateDate") + .HasColumnType("date") + .HasColumnName("certificate_date") + .HasComment("发证日期"); + + b.Property("CertificateNo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("certificate_no") + .HasComment("证件编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ServiceOrg") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("service_org") + .HasComment("服务单位"); + + b.Property("ServiceTradesId") + .HasColumnType("smallint") + .HasColumnName("service_trades_id") + .HasComment("服务行业"); + + b.HasKey("Id"); + + b.ToTable("health_certificate"); + + b.HasComment("健康证办理"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ImportLisResult", b => + { + b.Property("LisRequestNo") + .HasColumnType("uuid") + .HasColumnName("lis_request_no") + .HasComment("条码号"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .HasComment("项目"); + + b.Property("CheckDoctorName") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("check_doctor_name") + .HasComment("检查医生"); + + b.Property("CheckTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("check_time") + .HasComment("检查日期"); + + b.Property("CriticalRangeValue") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("critical_range_value"); + + b.Property("ImportTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("import_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)") + .HasComment("导入日期"); + + b.Property("ItemName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("item_name"); + + b.Property("PatientRegisterNo") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("patient_register_no") + .HasComment("条码号"); + + b.Property("ReferenceRangeValue") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("reference_range_value") + .HasComment("参考范围"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("ReportPrompt") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("report_prompt") + .HasComment("报告单提示"); + + b.Property("Result") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("result") + .HasComment("结果"); + + b.Property("Unit") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("unit") + .HasComment("单位"); + + b.HasKey("LisRequestNo", "ItemId") + .HasName("pk_import_lis_result"); + + b.HasIndex(new[] { "PatientRegisterNo" }, "ix_import_lis_result"); + + b.ToTable("import_lis_result"); + + b.HasComment("检验结果中间表"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ImportPacsPicture", b => + { + b.Property("CheckRequestNo") + .HasColumnType("uuid") + .HasColumnName("check_request_no"); + + b.Property("PictureFilename") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("picture_filename") + .HasComment("检查部位"); + + b.Property("AsbitemNames") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("asbitem_names") + .HasComment("组合项目名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("诊断结论"); + + b.Property("ImportTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("import_time") + .HasComment("导入日期"); + + b.Property("IsPrint") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_print") + .HasComment("检查所见"); + + b.Property("PatientRegisterNo") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("patient_register_no"); + + b.HasKey("CheckRequestNo", "PictureFilename") + .HasName("pk_import_pacs_picture_1"); + + b.ToTable("import_pacs_picture"); + + b.HasComment("pacs图片中间表"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ImportPacsResult", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AsbitemNames") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("asbitem_names") + .HasComment("组合项目名称"); + + b.Property("CheckDoctorName") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("check_doctor_name") + .HasComment("检查医生"); + + b.Property("CheckItems") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("check_items") + .HasComment("检查部位"); + + b.Property("CheckTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("check_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)") + .HasComment("检查日期"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("character varying(1000)") + .HasColumnName("description") + .HasComment("检查所见"); + + b.Property("ImportTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("import_time") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)") + .HasComment("导入日期"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PatientRegisterNo") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("patient_register_no"); + + b.Property("Suggestion") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("suggestion") + .HasComment("建议"); + + b.Property("Summary") + .HasMaxLength(1000) + .HasColumnType("character varying(1000)") + .HasColumnName("summary") + .HasComment("诊断结论"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "PatientRegisterNo" }, "ix_import_pacs_result"); + + b.ToTable("import_pacs_result"); + + b.HasComment("PACS结果中间表"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.InvoiceItemType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_invoice_item_type") + .IsUnique(); + + b.ToTable("invoice_item_type"); + + b.HasComment("发票项目类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.InvoiceOrg", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_invoice_org") + .IsUnique(); + + b.ToTable("invoice_org"); + + b.HasComment("发票单位设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Item", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CalculationFunction") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("calculation_function") + .HasComment("计算函数"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DefaultResult") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("default_result") + .HasComment("默认结果"); + + b.Property("DiagnosisFunction") + .HasMaxLength(2000) + .HasColumnType("character varying(2000)") + .HasColumnName("diagnosis_function") + .HasComment("诊断函数"); + + b.Property("DisplayName") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("EnglishShortName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("english_short_name") + .HasComment("英文缩写"); + + b.Property("InputCheck") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("input_check") + .HasComment("输入结果校验公式"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active") + .HasComment("启用"); + + b.Property("IsCalculationItem") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_calculation_item") + .HasComment("是计算项目"); + + b.Property("IsContinueProcess") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_continue_process") + .HasComment("是继续处理"); + + b.Property("IsDiagnosisFunction") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_diagnosis_function") + .HasComment("启用诊断函数"); + + b.Property("IsNameIntoSummary") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_name_into_summary") + .HasComment("名称进入小结"); + + b.Property("IsProduceSummary") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_produce_summary") + .HasComment("是生成小结"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength() + .HasComment("项目类别"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price") + .HasComment("价格"); + + b.Property("PriceItemId") + .HasMaxLength(8) + .HasColumnType("uuid") + .HasColumnName("price_item_id") + .IsFixedLength() + .HasComment("价表项目编码"); + + b.Property("ReferenceRangeTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("reference_range_type_flag") + .HasDefaultValueSql("'E'::bpchar") + .HasComment("参考范围类别0-无参考范围,1-数字型,2-字符型,3-性激素"); + + b.Property("ResultTemplateTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("result_template_type_flag") + .HasDefaultValueSql("0") + .HasComment("结果模板类别标志"); + + b.Property("SimpleCode") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("simple_code"); + + b.Property("UnitId") + .HasColumnType("uuid") + .HasColumnName("unit_id") + .IsFixedLength() + .HasComment("单位"); + + b.HasKey("Id"); + + b.HasIndex("ItemTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_item") + .IsUnique(); + + b.ToTable("item"); + + b.HasComment("项目设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemDefaultResult", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_item_default_result") + .IsUnique(); + + b.ToTable("item_default_result"); + + b.HasComment("项目默认结果设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultMatch", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("结果匹配编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength() + .HasComment("诊断编号"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1") + .HasComment("显示顺序"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Result") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("result") + .HasComment("结果"); + + b.HasKey("Id"); + + b.HasIndex("DiagnosisId"); + + b.HasIndex("ItemId"); + + b.ToTable("item_result_match"); + + b.HasComment("结果匹配设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("结果模板编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength() + .HasComment("诊断编号"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("IsNameIntoSummary") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_name_into_summary") + .HasComment("小结前是否加名称"); + + b.Property("IsResultIntoSummary") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_result_into_summary"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Result") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("result") + .HasComment("结果"); + + b.Property("ResultStatusId") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("result_status_id") + .HasComment("结果状态"); + + b.Property("SimpleCode") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("simple_code") + .HasComment("拼音简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "ItemId", "Result" }, "ix_item_result_template") + .IsUnique(); + + b.ToTable("item_result_template"); + + b.HasComment("项目结果模板设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultTemplateType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength(); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "ItemId", "DisplayName" }, "ix_item_result_template_type") + .IsUnique(); + + b.ToTable("item_result_template_type"); + + b.HasComment("项目结果模板类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_item_template") + .IsUnique(); + + b.ToTable("item_template"); + + b.HasComment("项目模板设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemTemplateDetail", b => + { + b.Property("ItemTemplateId") + .HasColumnType("uuid") + .HasColumnName("item_template_id") + .IsFixedLength(); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编号"); + + b.HasKey("ItemTemplateId", "ItemId") + .HasName("pk_item_template_detail"); + + b.HasIndex("ItemId"); + + b.ToTable("item_template_detail"); + + b.HasComment("项目模板明细"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CheckTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("check_type_flag") + .HasDefaultValueSql("'G'::bpchar") + .HasComment("检查类别,0-普通检查,1-检验,2-影像检查"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("GuidTypeId") + .HasColumnType("uuid") + .HasColumnName("guid_type_id") + .IsFixedLength() + .HasComment("指引类别"); + + b.Property("IsMergeAsbitem") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_merge_asbitem") + .HasComment("合并组合项目,Y-是,N-否"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MedicalReportTypeId") + .HasColumnType("uuid") + .HasColumnName("medical_report_type_id") + .IsFixedLength() + .HasComment("体检报告类别"); + + b.Property("ParentId") + .HasColumnType("uuid") + .HasColumnName("parent_id") + .IsFixedLength() + .HasComment("父id"); + + b.Property("PathCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("path_code") + .HasComment("路径编码"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex("GuidTypeId"); + + b.HasIndex("MedicalReportTypeId"); + + b.HasIndex(new[] { "DisplayName", "ParentId" }, "ix_item_type") + .IsUnique(); + + b.ToTable("item_type"); + + b.HasComment("项目类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.LisRequest", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("IsPrint") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_print") + .HasComment("是否已打印"); + + b.Property("IsSignIn") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_sign_in") + .HasComment("是签收"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LisRequestNo") + .HasColumnType("uuid") + .HasColumnName("lis_request_no") + .HasComment("检验申请单号"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("病人登记ID"); + + b.Property("SampleContainerId") + .HasColumnType("uuid") + .HasColumnName("sample_container_id") + .IsFixedLength() + .HasComment("标本容器编号"); + + b.Property("SampleTypeId") + .HasColumnType("uuid") + .HasColumnName("sample_type_id") + .IsFixedLength() + .HasComment("标本类型"); + + b.Property("Sampler") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("sampler") + .HasComment("采样人姓名"); + + b.Property("SamplingTime") + .HasColumnType("date") + .HasColumnName("sampling_time") + .HasComment("采样时间"); + + b.Property("SignInOrder") + .HasColumnType("integer") + .HasColumnName("sign_in_order") + .HasComment("签收顺序"); + + b.Property("SignInPerson") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("sign_in_person") + .HasComment("签收人姓名"); + + b.Property("SignInTime") + .HasColumnType("date") + .HasColumnName("sign_in_time") + .HasComment("签收时间"); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.HasIndex("SampleContainerId"); + + b.HasIndex("SampleTypeId"); + + b.HasIndex(new[] { "LisRequestNo" }, "ix_lis_request") + .IsUnique(); + + b.ToTable("lis_request"); + + b.HasComment("检验申请单"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MaritalStatus", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("id") + .HasDefaultValueSql("'0'::bpchar") + .HasComment("婚姻状况编号"); + + b.Property("DisplayName") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("display_name") + .HasComment("婚姻状况名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("SimpleCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_marital_status") + .IsUnique(); + + b.ToTable("marital_status"); + + b.HasComment("婚姻状况设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalConclusion", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("体检结论编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("体检结论名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MedicalConclusionTypeId") + .HasMaxLength(2) + .HasColumnType("character(2)") + .HasColumnName("medical_conclusion_type_id") + .IsFixedLength(); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex("MedicalConclusionTypeId"); + + b.ToTable("medical_conclusion"); + + b.HasComment("体检结论设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalConclusionType", b => + { + b.Property("Id") + .HasMaxLength(2) + .HasColumnType("character(2)") + .HasColumnName("id") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_medical_conclusion_type") + .IsUnique(); + + b.ToTable("medical_conclusion_type"); + + b.HasComment("体检结论类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalPackage", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("套餐主档编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1") + .HasComment("显示顺序"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar") + .HasComment("适用性别"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active") + .HasComment("启用标志"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price") + .HasComment("价格"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_medical_package") + .IsUnique(); + + b.ToTable("medical_package"); + + b.HasComment("体检套餐主档设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalPackageDetail", b => + { + b.Property("MedicalPackageId") + .HasColumnType("uuid") + .HasColumnName("medical_package_id") + .IsFixedLength(); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength() + .HasComment("组合项目编号"); + + b.HasKey("MedicalPackageId", "AsbitemId") + .HasName("pk_medical_package_detail"); + + b.HasIndex("AsbitemId"); + + b.ToTable("medical_package_detail"); + + b.HasComment("体检套餐包含的组合项目设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalReportType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("medical_report_type"); + + b.HasComment("体检报告类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("体检类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("体检类别名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_medical_type") + .IsUnique(); + + b.ToTable("medical_type"); + + b.HasComment("体检类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Nation", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("CountryCode") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("country_code"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("拼音简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_nation") + .IsUnique(); + + b.ToTable("nation"); + + b.HasComment("民族设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.OcCheckType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("职业病检查类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OcCheckTypeName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("oc_check_type_name") + .HasComment("职业病检查类别名称"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("oc_check_type"); + + b.HasComment("职业病检查类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.OperateLog", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ComputerName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("computer_name"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("OperateContent") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("operate_content"); + + b.Property("OperateTime") + .HasColumnType("date") + .HasColumnName("operate_time"); + + b.Property("OperateType") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("operate_type"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark"); + + b.Property("Sqlsyntax") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("sqlsyntax"); + + b.Property("TableName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("table_name"); + + b.Property("UserId") + .HasMaxLength(16) + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("WindowName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("window_name"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "ComputerName" }, "ix_operate_log"); + + b.HasIndex(new[] { "WindowName" }, "ix_operate_log_1"); + + b.ToTable("operate_log"); + + b.HasComment("操作日志,已经废弃"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.OrganizationUnitsCustomerOrg", b => + { + b.Property("CustomerOrgId") + .HasColumnType("uuid") + .HasColumnName("customer_org_id") + .IsFixedLength() + .HasComment("客户单位编号"); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id") + .IsFixedLength() + .HasComment("体检中心编号"); + + b.HasKey("CustomerOrgId", "OrganizationUnitId") + .HasName("pk_medical_center_org"); + + b.HasIndex("OrganizationUnitId"); + + b.ToTable("organization_units_customer_org"); + + b.HasComment("体检中心单位权限"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Patient", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Address") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("address") + .HasComment("地址"); + + b.Property("BirthDate") + .HasColumnType("date") + .HasColumnName("birth_date") + .HasComment("出生日期"); + + b.Property("BirthPlaceId") + .HasColumnType("uuid") + .HasColumnName("birth_place_id") + .IsFixedLength() + .HasComment("出生地"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("display_name") + .HasComment("姓名"); + + b.Property("Email") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("email") + .HasComment("email"); + + b.Property("IdNo") + .HasMaxLength(18) + .HasColumnType("character varying(18)") + .HasColumnName("id_no") + .HasComment("身份证号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MaritalStatusId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("marital_status_id") + .HasComment("婚姻状况"); + + b.Property("MobileTelephone") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("mobile_telephone") + .HasComment("手机号"); + + b.Property("NationId") + .HasColumnType("uuid") + .HasColumnName("nation_id") + .IsFixedLength() + .HasComment("民族编号"); + + b.Property("PatientNo") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("patient_no") + .HasComment("档案号"); + + b.Property("PatientPassword") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("patient_password") + .HasComment("登录密码"); + + b.Property("PostalCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("postal_code") + .HasComment("邮政编码"); + + b.Property("SexId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("sex_id") + .HasComment("性别"); + + b.Property("Telephone") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("telephone") + .HasComment("电话"); + + b.HasKey("Id"); + + b.HasIndex("PatientNo") + .IsUnique(); + + b.HasIndex(new[] { "IdNo" }, "ix_patient"); + + b.HasIndex(new[] { "DisplayName" }, "ix_patient_1"); + + b.ToTable("patient"); + + b.HasComment("体检人员档案"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientOccupationalDisease", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AbnormalTimes") + .HasColumnType("integer") + .HasColumnName("abnormal_times"); + + b.Property("AbortionTimes") + .HasColumnType("integer") + .HasColumnName("abortion_times"); + + b.Property("ChildrenNum") + .HasColumnType("integer") + .HasColumnName("children_num"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DiagnosisDate") + .HasColumnType("date") + .HasColumnName("diagnosis_date"); + + b.Property("DiagnosisHospital") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("diagnosis_hospital"); + + b.Property("DrinkFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("drink_flag"); + + b.Property("DrinkNum") + .HasColumnType("integer") + .HasColumnName("drink_num"); + + b.Property("DrinkYears") + .HasColumnType("integer") + .HasColumnName("drink_years"); + + b.Property("FirstMenstruation") + .HasColumnType("integer") + .HasColumnName("first_menstruation"); + + b.Property("HandleSuggestion") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("handle_suggestion"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MenstrualHistory") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("menstrual_history"); + + b.Property("MenstruationCycle") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("menstruation_cycle"); + + b.Property("MenstruationEndAge") + .HasColumnType("integer") + .HasColumnName("menstruation_end_age"); + + b.Property("MenstruationFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("menstruation_flag"); + + b.Property("MenstruationTimeLength") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("menstruation_time_length"); + + b.Property("NoOccupAbSuggestion") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("no_occup_ab_suggestion"); + + b.Property("NoOccupationalAbnormal") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("no_occupational_abnormal"); + + b.Property("OcCheckTypeId") + .HasColumnType("uuid") + .HasColumnName("oc_check_type_id") + .IsFixedLength(); + + b.Property("OccupationalAbSuggestion") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("occupational_ab_suggestion"); + + b.Property("OccupationalAbnormal") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("occupational_abnormal"); + + b.Property("OccupationalDisease") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("occupational_disease"); + + b.Property("Other") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("other"); + + b.Property("PoisonWorkTime") + .HasMaxLength(6) + .HasColumnType("character varying(6)") + .HasColumnName("poison_work_time"); + + b.Property("PrematureBirthTimes") + .HasColumnType("integer") + .HasColumnName("premature_birth_times"); + + b.Property("PreviousHistory") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("previous_history"); + + b.Property("Recovery") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("recovery"); + + b.Property("SmokeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("smoke_flag"); + + b.Property("SmokeNum") + .HasColumnType("integer") + .HasColumnName("smoke_num"); + + b.Property("SmokeYears") + .HasColumnType("integer") + .HasColumnName("smoke_years"); + + b.Property("StillbirthTimes") + .HasColumnType("integer") + .HasColumnName("stillbirth_times"); + + b.Property("TotalWorkTime") + .HasMaxLength(6) + .HasColumnType("character varying(6)") + .HasColumnName("total_work_time"); + + b.HasKey("Id"); + + b.ToTable("patient_occupational_disease"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientOccupationalHistory", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("BeginDate") + .HasColumnType("date") + .HasColumnName("begin_date"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("EndDate") + .HasColumnType("date") + .HasColumnName("end_date"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Org") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("org"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("Poison") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("poison"); + + b.Property("ProtectiveMeasures") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("protective_measures"); + + b.Property("WorkShop") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("work_shop"); + + b.Property("WorkType") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("work_type"); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.ToTable("patient_occupational_history"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientPoison", b => + { + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("PoisonId") + .HasColumnType("uuid") + .HasColumnName("poison_id") + .IsFixedLength(); + + b.HasKey("PatientRegisterId", "PoisonId") + .HasName("pk_patient_poison"); + + b.HasIndex("PoisonId"); + + b.ToTable("patient_poison"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientRegister", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("登记流水号"); + + b.Property("Age") + .HasColumnType("smallint") + .HasColumnName("age") + .HasComment("年龄"); + + b.Property("AuditDate") + .HasColumnType("date") + .HasColumnName("audit_date") + .HasComment("审核日期"); + + b.Property("AuditDoctor") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("audit_doctor") + .HasComment("审核医生"); + + b.Property("BirthDate") + .HasColumnType("date") + .HasColumnName("birth_date") + .HasComment("出生日期"); + + b.Property("CompleteFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("complete_flag") + .HasDefaultValueSql("'0'::bpchar") + .HasComment("完成标志"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CustomerOrgGroupId") + .HasColumnType("uuid") + .HasColumnName("customer_org_group_id") + .IsFixedLength() + .HasComment("分组"); + + b.Property("CustomerOrgId") + .HasColumnType("uuid") + .HasColumnName("customer_org_id") + .IsFixedLength() + .HasComment("单位编号"); + + b.Property("CustomerOrgRegisterId") + .HasColumnType("uuid") + .HasColumnName("customer_org_register_id") + .HasComment("客户单位登记ID"); + + b.Property("GuidePrintTimes") + .HasColumnType("smallint") + .HasColumnName("guide_print_times") + .HasComment("指引单打印次数"); + + b.Property("InterposeMeasure") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("interpose_measure") + .HasComment("干预措施"); + + b.Property("IsAudit") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_audit") + .HasComment("审核"); + + b.Property("IsLock") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_lock") + .HasComment("锁住"); + + b.Property("IsMedicalStart") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_medical_start") + .HasComment("体检开始标志"); + + b.Property("IsNameHide") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_name_hide") + .HasComment("隐藏姓名"); + + b.Property("IsPhoneFollow") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_phone_follow") + .HasComment("电话随访"); + + b.Property("IsRecoverGuide") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_recover_guide") + .HasComment("指引单收回"); + + b.Property("IsUpload") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_upload") + .HasComment("是否上传到WEB"); + + b.Property("IsVip") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_vip") + .HasComment("vip客户"); + + b.Property("JobCardNo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("job_card_no") + .HasComment("工卡号"); + + b.Property("JobPost") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("job_post") + .HasComment("职务"); + + b.Property("JobTitle") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("job_title") + .HasComment("职称"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MaritalStatusId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("marital_status_id") + .HasDefaultValueSql("'0'::bpchar") + .HasComment("婚姻状况"); + + b.Property("MedicalCardNo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("medical_card_no") + .HasComment("体检卡号"); + + b.Property("MedicalConclusionId") + .HasColumnType("uuid") + .HasColumnName("medical_conclusion_id") + .IsFixedLength() + .HasComment("体检结论"); + + b.Property("MedicalPackageId") + .HasColumnType("uuid") + .HasColumnName("medical_package_id") + .IsFixedLength() + .HasComment("套餐"); + + b.Property("MedicalStartDate") + .ValueGeneratedOnAdd() + .HasColumnType("date") + .HasColumnName("medical_start_date") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)") + .HasComment("体检开始日期"); + + b.Property("MedicalTimes") + .HasColumnType("smallint") + .HasColumnName("medical_times") + .HasComment("体检次数"); + + b.Property("MedicalTypeId") + .HasColumnType("uuid") + .HasColumnName("medical_type_id") + .IsFixedLength() + .HasComment("体检类别"); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id") + .HasComment("体检中心ID"); + + b.Property("PatientId") + .HasMaxLength(10) + .HasColumnType("uuid") + .HasColumnName("patient_id") + .HasComment("档案号"); + + b.Property("PatientName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("patient_name") + .HasComment("姓名"); + + b.Property("PatientRegisterNo") + .HasMaxLength(12) + .HasColumnType("character varying(12)") + .HasColumnName("patient_register_no") + .HasComment("条码号"); + + b.Property("PersonnelTypeId") + .HasColumnType("uuid") + .HasColumnName("personnel_type_id") + .IsFixedLength() + .HasComment("人员类别"); + + b.Property("Photo") + .HasColumnType("bytea") + .HasColumnName("photo") + .HasComment("照片"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("ReportPrintTimes") + .HasColumnType("smallint") + .HasColumnName("report_print_times") + .HasComment("体检报告打印次数"); + + b.Property("Salesman") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("salesman") + .HasComment("介绍人"); + + b.Property("SexHormoneTermId") + .HasColumnType("uuid") + .HasColumnName("sex_hormone_term_id") + .HasComment("性激素期限"); + + b.Property("SexId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("sex_id") + .HasComment("性别"); + + b.Property("SummaryDate") + .HasColumnType("date") + .HasColumnName("summary_date") + .HasComment("总检日期"); + + b.Property("SummaryDoctor") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("summary_doctor") + .HasComment("总检医生"); + + b.Property("ThirdInfo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("third_info") + .HasComment("附加第三方信息"); + + b.HasKey("Id"); + + b.HasIndex("MaritalStatusId"); + + b.HasIndex(new[] { "CustomerOrgRegisterId" }, "fki_fk_patient_register_org_register"); + + b.HasIndex(new[] { "OrganizationUnitId" }, "fki_fk_patient_register_ororganization_unit"); + + b.HasIndex(new[] { "PatientRegisterNo" }, "ix_patient_register") + .IsUnique(); + + b.HasIndex(new[] { "PatientId", "MedicalTimes" }, "ix_patient_register_1") + .IsUnique(); + + b.HasIndex(new[] { "PatientName" }, "ix_patient_register_2"); + + b.ToTable("patient_register"); + + b.HasComment("体检登记主档"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientSymptom", b => + { + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id"); + + b.Property("SymptomId") + .HasColumnType("uuid") + .HasColumnName("symptom_id") + .IsFixedLength(); + + b.Property("Degree") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("degree"); + + b.Property("TimeLength") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("time_length"); + + b.HasKey("PatientRegisterId", "SymptomId") + .HasName("pk_patient_symptom"); + + b.HasIndex("SymptomId"); + + b.ToTable("patient_symptom"); + + b.HasComment("职业病-体检病人症状"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PayMode", b => + { + b.Property("Id") + .HasMaxLength(4) + .HasColumnType("character(4)") + .HasColumnName("id") + .IsFixedLength() + .HasComment("编号,固定编码"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_payment_mode") + .IsUnique(); + + b.ToTable("pay_mode"); + + b.HasComment("支付方式设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PersonnelType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("人员类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("人员类别名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_personnel_type") + .IsUnique(); + + b.ToTable("personnel_type"); + + b.HasComment("人员类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PhoneFollow", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("FollowContent") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("follow_content") + .HasComment("随访内容"); + + b.Property("FollowUpPlanId") + .HasColumnType("uuid") + .HasColumnName("follow_up_plan_id") + .HasComment("随访计划ID"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("病人登记ID"); + + b.Property("ReplyContent") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("reply_content") + .HasComment("回复内容"); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.ToTable("phone_follow"); + + b.HasComment("电话随访"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Poison", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("毒害编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("毒害名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PoisonTypeId") + .HasColumnType("uuid") + .HasColumnName("poison_type_id") + .IsFixedLength(); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("PoisonTypeId"); + + b.ToTable("poison"); + + b.HasComment("毒害因素设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PoisonType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("毒害类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("毒害类别名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("poison_type"); + + b.HasComment("毒害因素类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PositionType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("职务编号"); + + b.Property("CreationTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("职务名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime") + .HasComment("最后修改日期"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId") + .HasComment("最后修改者"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_position_type") + .IsUnique(); + + b.ToTable("position_type"); + + b.HasComment("职务类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PriceItem", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("InvoiceItemTypeId") + .HasColumnType("uuid") + .HasColumnName("invoice_item_type_id") + .IsFixedLength() + .HasComment("发票项目类别ID"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Price") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("price") + .HasComment("价格"); + + b.Property("PriceItemCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("price_item_code") + .HasComment("价表编码"); + + b.Property("SimpleCode") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("InvoiceItemTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_price_item") + .IsUnique(); + + b.ToTable("price_item"); + + b.HasComment("价表项目设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PrimarykeyBuilder", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("主键编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DateString") + .HasMaxLength(8) + .HasColumnType("character(8)") + .HasColumnName("date_string") + .IsFixedLength() + .HasComment("日期"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SerialNo") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("serial_no") + .HasComment("序列号"); + + b.HasKey("Id"); + + b.ToTable("primarykey_builder"); + + b.HasComment("主键产生器,废弃"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.QueueRegister", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CallTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("call_time") + .HasComment("叫号时间"); + + b.Property("CompleteFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("complete_flag") + .HasDefaultValueSql("0") + .HasComment("完成标志"); + + b.Property("CreationTime") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("排队顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("NoCompleteReason") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("no_complete_reason") + .HasDefaultValueSql("0") + .HasComment("未完成原因"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("病人登记ID"); + + b.Property("RoomId") + .HasColumnType("uuid") + .HasColumnName("room_id") + .IsFixedLength() + .HasComment("房间ID"); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.ToTable("queue_register"); + + b.HasComment("排队登记"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ReferenceRange", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("参考范围编号"); + + b.Property("AgeLowerLimit") + .HasColumnType("smallint") + .HasColumnName("age_lower_limit") + .HasComment("年龄下限"); + + b.Property("AgeUpperLimit") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasColumnName("age_upper_limit") + .HasDefaultValueSql("200") + .HasComment("年龄上限"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CriticalRangeValue") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("critical_range_value"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar") + .HasComment("性别"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LowerDiagnosisId") + .HasColumnType("uuid") + .HasColumnName("lower_diagnosis_id") + .IsFixedLength() + .HasComment("偏低诊断"); + + b.Property("ReferenceRangeTypeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("reference_range_type_flag") + .HasComment("参考范围类别0-无参考范围,1-数字型,2-字符型,3-性激素"); + + b.Property("ReferenceRangeValue") + .HasMaxLength(150) + .HasColumnType("character varying(150)") + .HasColumnName("reference_range_value"); + + b.Property("UpperDiagnosisId") + .HasColumnType("uuid") + .HasColumnName("upper_diagnosis_id") + .IsFixedLength() + .HasComment("偏高诊断"); + + b.HasKey("Id"); + + b.HasIndex("ItemId"); + + b.ToTable("reference_range"); + + b.HasComment("项目参考范围设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterAsbitem", b => + { + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id") + .HasComment("检查单ID"); + + b.Property("AsbitemId") + .HasMaxLength(6) + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength() + .HasComment("组合项目"); + + b.Property("Amount") + .HasColumnType("smallint") + .HasColumnName("amount") + .HasComment("数量"); + + b.Property("ChargePrice") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("charge_price") + .HasComment("实收价格"); + + b.Property("IsCharge") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_charge") + .HasComment("是否已收费"); + + b.Property("LisRequestId") + .HasMaxLength(20) + .HasColumnType("uuid") + .HasColumnName("lis_request_id") + .HasComment("LIS申请ID"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("登记流水号"); + + b.Property("PayTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("pay_type_flag") + .HasDefaultValueSql("0") + .HasComment("支付方式,比如是自费、免费、单位支付"); + + b.Property("RegisterAsbitemId") + .HasColumnType("uuid") + .HasColumnName("register_asbitem_id") + .HasComment("主键"); + + b.Property("StandardPrice") + .HasPrecision(10, 2) + .HasColumnType("numeric(10,2)") + .HasColumnName("standard_price") + .HasComment("标准价格"); + + b.HasKey("RegisterCheckId", "AsbitemId") + .HasName("pk_register_asbitem"); + + b.HasIndex("AsbitemId"); + + b.HasIndex(new[] { "PatientRegisterId", "AsbitemId" }, "ix_register_asbitem") + .IsUnique(); + + b.ToTable("register_asbitem"); + + b.HasComment("检查组合项目记录"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheck", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AuditTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("audit_time") + .HasComment("审核时间"); + + b.Property("AuditorUserId") + .HasColumnType("uuid") + .HasColumnName("auditor_user_id") + .HasComment("审核医生ID"); + + b.Property("CheckDate") + .HasColumnType("date") + .HasColumnName("check_date") + .HasComment("检查日期"); + + b.Property("CheckDoctorId") + .HasColumnType("uuid") + .HasColumnName("check_doctor_id") + .HasComment("检查医生ID"); + + b.Property("CheckRequestNo") + .HasMaxLength(20) + .HasColumnType("uuid") + .HasColumnName("check_request_no") + .HasComment("检查单号"); + + b.Property("CheckRequestPrintTimes") + .HasColumnType("smallint") + .HasColumnName("check_request_print_times") + .HasComment("检查申请单打印次数"); + + b.Property("CompleteFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("complete_flag") + .HasDefaultValueSql("0") + .HasComment("完成标志"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CriticalValue") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("critical_value") + .HasComment("危急值"); + + b.Property("CriticalValueCreateDate") + .HasColumnType("date") + .HasColumnName("critical_value_create_date") + .HasComment("危急值创建日期"); + + b.Property("CriticalValueFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("critical_value_flag") + .HasDefaultValueSql("0") + .HasComment("危急值标志"); + + b.Property("CriticalValueProcessContent") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("critical_value_process_content") + .HasComment("危急值处理内容"); + + b.Property("CriticalValueProcessDate") + .HasColumnType("date") + .HasColumnName("critical_value_process_date") + .HasComment("危急值处理日期"); + + b.Property("CriticalValueProcessDoctor") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("critical_value_process_doctor") + .HasComment("危急值处理医生"); + + b.Property("CriticalValueProcessFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("critical_value_process_flag") + .HasComment("危急值处理标志"); + + b.Property("IsAudit") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_audit") + .HasComment("是审核"); + + b.Property("IsLock") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_lock") + .HasComment("是否锁住"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ThirdInfo") + .HasMaxLength(80) + .HasColumnType("character varying(80)") + .HasColumnName("third_info") + .HasComment("第三方信息"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "CheckRequestNo" }, "ix_register_check_1"); + + b.ToTable("register_check"); + + b.HasComment("登记检查单"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckCriticalValue", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CriticalValue") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("critical_value") + .HasComment("危急值"); + + b.Property("Doctor") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("doctor") + .HasComment("处理医生"); + + b.Property("IsComplete") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_complete") + .HasComment("是否完成"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ProcessTypeFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("process_type_flag") + .HasComment("处理类别标志"); + + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id") + .HasComment("登记检查ID"); + + b.HasKey("Id"); + + b.ToTable("register_check_critical_value"); + + b.HasComment("检查危急值"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckItem", b => + { + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编号"); + + b.Property("CheckDate") + .HasColumnType("date") + .HasColumnName("check_date") + .HasComment("检查日期"); + + b.Property("CheckDoctorName") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("check_doctor_name") + .HasComment("检查医生"); + + b.Property("CriticalRangeValue") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("critical_range_value") + .HasComment("危急值范围"); + + b.Property("CriticalValue") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("critical_value") + .HasComment("危急值"); + + b.Property("ReferenceRangeValue") + .ValueGeneratedOnAdd() + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("reference_range_value") + .HasDefaultValueSql("''::character varying") + .HasComment("参考范围"); + + b.Property("Result") + .HasMaxLength(1000) + .HasColumnType("character varying(1000)") + .HasColumnName("result") + .HasComment("结果"); + + b.Property("ResultStatusId") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("result_status_id") + .HasComment("报告单提示"); + + b.Property("Unit") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("unit") + .HasComment("单位"); + + b.HasKey("RegisterCheckId", "ItemId") + .HasName("pk_register_item_1"); + + b.HasIndex("ItemId"); + + b.HasIndex("ResultStatusId"); + + b.ToTable("register_check_item"); + + b.HasComment("检查明细项目记录"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckPicture", b => + { + b.Property("Id") + .HasColumnType("uuid") + .HasComment("检查图片编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1") + .HasComment("显示顺序"); + + b.Property("IsPrint") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_print") + .HasComment("打印标志"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PictureFilename") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("picture_filename") + .HasComment("图片名"); + + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id") + .HasComment("登记流水号"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "RegisterCheckId", "PictureFilename" }, "ix_check_picture") + .IsUnique(); + + b.ToTable("register_check_picture"); + + b.HasComment("体检登记组合项目图片"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckSuggestion", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id") + .HasComment("登记检查ID"); + + b.Property("Suggestion") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("suggestion") + .HasComment("建议"); + + b.HasKey("Id"); + + b.HasIndex("RegisterCheckId"); + + b.ToTable("register_check_suggestion"); + + b.HasComment("登记检查建议"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckSummary", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("RegisterCheckId") + .HasColumnType("uuid") + .HasColumnName("register_check_id") + .HasComment("登记检查ID"); + + b.Property("Summary") + .HasMaxLength(500) + .HasColumnType("character varying(500)") + .HasColumnName("summary") + .HasComment("综述"); + + b.Property("SummaryFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("summary_flag") + .HasComment("综述标志"); + + b.HasKey("Id"); + + b.HasIndex("RegisterCheckId"); + + b.ToTable("register_check_summary"); + + b.HasComment("登记检查综述"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ResultStatus", b => + { + b.Property("Id") + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("id"); + + b.Property("DataInputBackgroundColor") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("data_input_background_color") + .HasDefaultValueSql("16777215") + .HasComment("数据录入报告单颜色"); + + b.Property("DataInputFontColor") + .HasColumnType("integer") + .HasColumnName("data_input_font_color") + .HasComment("数据录入字体颜色"); + + b.Property("DataInputPrompt") + .HasMaxLength(8) + .HasColumnType("character varying(8)") + .HasColumnName("data_input_prompt") + .HasComment("数据录入提示"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("ReportBackgroundColor") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("report_background_color") + .HasDefaultValueSql("16777215") + .HasComment("报告单背景颜色"); + + b.Property("ReportFontColor") + .HasColumnType("integer") + .HasColumnName("report_font_color") + .HasComment("报告单字体颜色"); + + b.Property("ReportPrompt") + .HasMaxLength(8) + .HasColumnType("character varying(8)") + .HasColumnName("report_prompt") + .HasComment("报告单提示"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_result_status") + .IsUnique(); + + b.ToTable("result_status"); + + b.HasComment("结果状态设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Room", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DepartmentId") + .HasColumnType("uuid") + .HasColumnName("department_id") + .IsFixedLength() + .HasComment(""); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("ForSexId") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("for_sex_id") + .HasDefaultValueSql("'A'::bpchar"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength() + .HasComment("项目类别编号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("RoomTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("room_type_flag") + .HasDefaultValueSql("0"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("DepartmentId"); + + b.HasIndex("ItemTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_room") + .IsUnique(); + + b.ToTable("room"); + + b.HasComment("房间设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleContainer", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("ContainerColor") + .HasColumnType("integer") + .HasColumnName("container_color") + .HasComment("颜色"); + + b.Property("ContainerColorName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("container_color_name") + .HasComment("颜色名"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_sample_container") + .IsUnique(); + + b.ToTable("sample_container"); + + b.HasComment("标本容器设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleGroup", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SampleContainerId") + .HasColumnType("uuid") + .HasColumnName("sample_container_id") + .IsFixedLength() + .HasComment("标本容器ID"); + + b.Property("SampleTypeId") + .HasColumnType("uuid") + .HasColumnName("sample_type_id") + .IsFixedLength() + .HasComment("标本类型ID"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex("SampleContainerId"); + + b.HasIndex("SampleTypeId"); + + b.HasIndex(new[] { "DisplayName" }, "ix_sample_group") + .IsUnique(); + + b.ToTable("sample_group"); + + b.HasComment("标本分组设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleGroupDetail", b => + { + b.Property("SampleGroupId") + .HasColumnType("uuid") + .HasColumnName("sample_group_id") + .IsFixedLength(); + + b.Property("AsbitemId") + .HasColumnType("uuid") + .HasColumnName("asbitem_id") + .IsFixedLength() + .HasComment("组合项目编号"); + + b.HasKey("SampleGroupId", "AsbitemId") + .HasName("pk_sample_group_detail"); + + b.HasIndex(new[] { "AsbitemId" }, "ix_sample_group_detail") + .IsUnique(); + + b.ToTable("sample_group_detail"); + + b.HasComment("标本分组包含组合项目设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_sample_type"); + + b.ToTable("sample_type"); + + b.HasComment("标本类型设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ServiceTrade", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DepartmentId") + .HasColumnType("uuid") + .HasColumnName("department_id") + .IsFixedLength(); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("ValidPeriod") + .HasColumnType("smallint") + .HasColumnName("valid_period") + .HasComment("有效期"); + + b.Property("ValidPeriodDisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("valid_period_display_name"); + + b.Property("ValidPeriodUnit") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("valid_period_unit"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DepartmentId", "DisplayName" }, "ix_service_trades") + .IsUnique(); + + b.ToTable("service_trades"); + + b.HasComment("服务行业设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SettleAccount", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CompletedBy") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("completed_by") + .HasComment("结账人"); + + b.Property("CompletedTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("completed_time") + .HasComment("结账时间"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("IsComplete") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_complete") + .HasComment("是完成"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.HasKey("Id"); + + b.ToTable("settle_account"); + + b.HasComment("结账"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Sex", b => + { + b.Property("Id") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("id"); + + b.Property("DisplayName") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("SimpleCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("sex"); + + b.HasComment("性别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SexHormoneReferenceRange", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("AgeLowerLimit") + .HasColumnType("smallint") + .HasColumnName("age_lower_limit") + .HasComment("年龄下限"); + + b.Property("AgeUpperLimit") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasColumnName("age_upper_limit") + .HasDefaultValueSql("200") + .HasComment("年龄上限"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("CriticalRangeValue") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("critical_range_value") + .HasComment("危急值参考范围"); + + b.Property("ItemId") + .HasColumnType("uuid") + .HasColumnName("item_id") + .IsFixedLength() + .HasComment("项目编号"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LowerDiagnosisId") + .HasColumnType("uuid") + .HasColumnName("lower_diagnosis_id") + .IsFixedLength() + .HasComment("下限诊断"); + + b.Property("ReferenceRangeValue") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("reference_range_value") + .HasComment("参考范围"); + + b.Property("SexHormoneTermId") + .HasColumnType("uuid") + .HasColumnName("sex_hormone_term_id") + .IsFixedLength() + .HasComment("性激素期限ID"); + + b.Property("UpperDiagnosisId") + .HasColumnType("uuid") + .HasColumnName("upper_diagnosis_id") + .IsFixedLength() + .HasComment("上限诊断"); + + b.HasKey("Id"); + + b.HasIndex("ItemId"); + + b.HasIndex("SexHormoneTermId"); + + b.ToTable("sex_hormone_reference_range"); + + b.HasComment("性激素参考范围设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SexHormoneTerm", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_sex_hormone_term") + .IsUnique(); + + b.ToTable("sex_hormone_term"); + + b.HasComment("性激素期限设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SmsSend", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Content") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("content") + .HasComment("短信内容"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("FollowUpPlanId") + .HasColumnType("uuid") + .HasColumnName("follow_up_plan_id") + .HasComment("随访计划ID"); + + b.Property("IsComplete") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_complete") + .HasComment("是完成"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("MobileTelephone") + .HasMaxLength(11) + .HasColumnType("character varying(11)") + .HasColumnName("mobile_telephone") + .HasComment("手机号"); + + b.Property("PatientId") + .HasMaxLength(10) + .HasColumnType("uuid") + .HasColumnName("patient_id") + .HasComment("人员ID"); + + b.Property("PatientName") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("patient_name") + .HasComment("姓名"); + + b.Property("SmsTypeId") + .HasColumnType("uuid") + .HasColumnName("sms_type_id") + .IsFixedLength() + .HasComment("短信类别ID"); + + b.HasKey("Id"); + + b.ToTable("sms_send"); + + b.HasComment("短信发送"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SmsTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("Content") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("content") + .HasComment("短信内容"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("smallint") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("SmsTypeId") + .HasColumnType("uuid") + .HasColumnName("sms_type_id") + .IsFixedLength() + .HasComment("短信类别ID"); + + b.HasKey("Id"); + + b.ToTable("sms_template"); + + b.HasComment("短信模板"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SmsType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("smallint") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("sms_type"); + + b.HasComment("短信类别"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Suggestion", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength() + .HasComment("诊断ID"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SuggestionContent") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("suggestion_content") + .HasComment("建议内容"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DiagnosisId", "SuggestionContent" }, "ix_suggestion") + .IsUnique(); + + b.ToTable("suggestion"); + + b.HasComment("建议设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumDiagnosis", b => + { + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("病人登记ID"); + + b.Property("DiagnosisId") + .HasColumnType("uuid") + .HasColumnName("diagnosis_id") + .IsFixedLength() + .HasComment("诊断ID"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("SumSuggestionHeaderId") + .HasColumnType("uuid") + .HasColumnName("sum_suggestion_header_id") + .HasComment("建议头ID"); + + b.HasKey("PatientRegisterId", "DiagnosisId") + .HasName("pk_summary_diagnosis"); + + b.HasIndex("DiagnosisId"); + + b.ToTable("sum_diagnosis"); + + b.HasComment("总检诊断"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SummaryTemplate", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("TemplateContent") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("template_content") + .HasComment("模板内容"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_summary_template") + .IsUnique(); + + b.ToTable("summary_template"); + + b.HasComment("综述模板设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSuggestionContent", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SuggestionContent") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("suggestion_content") + .HasComment("建议内容"); + + b.Property("SumSuggestionHeaderId") + .HasColumnType("uuid") + .HasColumnName("sum_suggestion_header_id") + .HasComment("建议头ID"); + + b.HasKey("Id"); + + b.HasIndex("SumSuggestionHeaderId"); + + b.ToTable("sum_suggestion_content"); + + b.HasComment("总检建议内容"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSuggestionHeader", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("病人登记ID"); + + b.Property("SuggestionFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("suggestion_flag") + .HasComment("建议标志"); + + b.Property("SuggestionTitle") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("suggestion_title") + .HasComment("建议标题"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "PatientRegisterId", "SuggestionTitle" }, "ix_sum_suggestion_title") + .IsUnique(); + + b.ToTable("sum_suggestion_header"); + + b.HasComment("总检建议头"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSummaryContent", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SumSummaryHeaderId") + .HasColumnType("uuid") + .HasColumnName("sum_summary_header_id") + .HasComment("建议头ID"); + + b.Property("SummaryContent") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("summary_content") + .HasComment("建议内容"); + + b.HasKey("Id"); + + b.HasIndex("SumSummaryHeaderId"); + + b.ToTable("sum_summary_content"); + + b.HasComment("总检综述内容"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSummaryHeader", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PatientRegisterId") + .HasColumnType("uuid") + .HasColumnName("patient_register_id") + .HasComment("病人登记ID"); + + b.Property("SummaryFlag") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("summary_flag") + .HasComment("综述标志"); + + b.Property("SummaryTitle") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("summary_title") + .HasComment("综述标题"); + + b.HasKey("Id"); + + b.HasIndex("PatientRegisterId"); + + b.ToTable("sum_summary_header"); + + b.HasComment("总检综述头"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Symptom", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("症状编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("症状名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("symptom"); + + b.HasComment("症状"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Sysdiagram", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("Definition") + .HasColumnType("bytea") + .HasColumnName("definition"); + + b.Property("DisplayName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("display_name"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("PrincipalId") + .HasColumnType("uuid") + .HasColumnName("principal_id"); + + b.Property("Version") + .HasColumnType("integer") + .HasColumnName("version"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "PrincipalId", "DisplayName" }, "uk_principal_name") + .IsUnique(); + + b.ToTable("sysdiagrams"); + + b.HasComment("不是本软件的表,估计是系统自动生成的"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParm", b => + { + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("参数名"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark") + .HasComment("备注"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("SysParmTypeId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("sys_parm_type_id") + .HasComment("参数类别ID"); + + b.Property("ValueType") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("value_type") + .HasComment("结果类别"); + + b.HasKey("Id"); + + b.HasIndex("SysParmTypeId"); + + b.ToTable("sys_parm"); + + b.HasComment("系统参数设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmType", b => + { + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("id"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("parent_id") + .HasComment("父ID"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("sys_parm_type"); + + b.HasComment("系统参数类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmValue", b => + { + b.Property("SysParmId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("sys_parm_id") + .HasComment("参数ID"); + + b.Property("OrganizationUnitId") + .HasColumnType("uuid") + .HasColumnName("organization_unit_id") + .IsFixedLength() + .HasComment("单位ID"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParmValue") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("parm_value") + .HasComment("参数值"); + + b.Property("Remark") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("remark") + .HasComment("备注"); + + b.HasKey("SysParmId", "OrganizationUnitId") + .HasName("pk_sys_parm_value"); + + b.ToTable("sys_parm_value"); + + b.HasComment("系统参数值设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmValueOption", b => + { + b.Property("SysParmId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("sys_parm_id"); + + b.Property("ValueOption") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("value_option") + .HasComment("可选项"); + + b.Property("DisplayOrder") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("display_order") + .HasDefaultValueSql("1"); + + b.Property("ValueOptionName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("value_option_name") + .HasComment("可选项名"); + + b.HasKey("SysParmId", "ValueOption") + .HasName("pk_sys_parm_value_option"); + + b.ToTable("sys_parm_value_option"); + + b.HasComment("系统参数可选值设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.TitleType", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength() + .HasComment("职称类别编号"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name") + .HasComment("职称类别名称"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order") + .HasComment("显示顺序"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code") + .HasComment("自定义简码"); + + b.HasKey("Id"); + + b.HasIndex(new[] { "DisplayName" }, "ix_title_type") + .IsUnique(); + + b.ToTable("title_type"); + + b.HasComment("职称类别设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Unit", b => + { + b.Property("Id") + .HasColumnType("uuid") + .IsFixedLength(); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("DisplayOrder") + .HasColumnType("integer") + .HasColumnName("display_order"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.HasKey("Id"); + + b.ToTable("unit"); + + b.HasComment("单位设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.User", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Address") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("address"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DepartmentId") + .HasColumnType("uuid") + .HasColumnName("department_id") + .IsFixedLength(); + + b.Property("DisplayName") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("display_name"); + + b.Property("Email") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("email"); + + b.Property("IsActive") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_active"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LockScreenTimeInterval") + .HasColumnType("integer") + .HasColumnName("lock_screen_time_interval"); + + b.Property("ModifiedDate") + .ValueGeneratedOnAdd() + .HasColumnType("date") + .HasColumnName("modified_date") + .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); + + b.Property("Modifier") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("modifier"); + + b.Property("PasswordHash") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("password_hash"); + + b.Property("PasswordSalt") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("password_salt"); + + b.Property("Photo") + .HasColumnType("bytea") + .HasColumnName("photo"); + + b.Property("PositionTypeId") + .HasColumnType("uuid") + .HasColumnName("position_type_id"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("remark"); + + b.Property("SexId") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("sex_id"); + + b.Property("SimpleCode") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("simple_code"); + + b.Property("Telephone") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("telephone"); + + b.Property("TitleTypeId") + .HasColumnType("uuid") + .HasColumnName("title_type_id"); + + b.Property("UserTypeFlag") + .ValueGeneratedOnAdd() + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("user_type_flag") + .HasDefaultValueSql("0") + .HasComment("用户类型"); + + b.HasKey("Id"); + + b.HasIndex("DepartmentId"); + + b.ToTable("users"); + + b.HasComment("用户表,废弃"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserDepartment", b => + { + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("DepartmentId") + .HasColumnType("uuid") + .HasColumnName("department_id") + .IsFixedLength(); + + b.HasKey("UserId", "DepartmentId") + .HasName("pk_user_operate_department"); + + b.HasIndex("DepartmentId"); + + b.ToTable("user_department"); + + b.HasComment("用户科室操作权限,废弃"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserGrouping", b => + { + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("GroupingId") + .HasColumnType("uuid") + .HasColumnName("grouping_id"); + + b.HasKey("UserId", "GroupingId") + .HasName("pk_user_grouping"); + + b.HasIndex("GroupingId"); + + b.ToTable("user_grouping"); + + b.HasComment("用户组权限-废弃"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserItemType", b => + { + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("ItemTypeId") + .HasColumnType("uuid") + .HasColumnName("item_type_id") + .IsFixedLength() + .HasComment("项目类别ID"); + + b.HasKey("UserId", "ItemTypeId") + .HasName("pk_user_item_type"); + + b.HasIndex("ItemTypeId"); + + b.ToTable("user_item_type"); + + b.HasComment("用户项目类别权限设置"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserRight", b => + { + b.Property("Application") + .HasMaxLength(32) + .HasColumnType("character varying(32)") + .HasColumnName("application"); + + b.Property("WindowName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("window_name"); + + b.Property("ControlName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("control_name"); + + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("IsUser") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("is_user"); + + b.Property("Status") + .HasMaxLength(1) + .HasColumnType("character(1)") + .HasColumnName("status"); + + b.HasKey("Application", "WindowName", "ControlName", "UserId", "IsUser") + .HasName("pk_sys_function"); + + b.ToTable("user_rights"); + + b.HasComment("用户控件权限-废弃"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("character varying(96)") + .HasColumnName("ApplicationName"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("BrowserInfo"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("ClientId"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("ClientIpAddress"); + + b.Property("ClientName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("ClientName"); + + b.Property("Comments") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("Comments"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("CorrelationId"); + + b.Property("Exceptions") + .HasColumnType("text"); + + b.Property("ExecutionDuration") + .HasColumnType("integer") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("timestamp without time zone"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("HttpMethod") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("HttpMethod"); + + b.Property("HttpStatusCode") + .HasColumnType("integer") + .HasColumnName("HttpStatusCode"); + + b.Property("ImpersonatorTenantId") + .HasColumnType("uuid") + .HasColumnName("ImpersonatorTenantId"); + + b.Property("ImpersonatorTenantName") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("ImpersonatorTenantName"); + + b.Property("ImpersonatorUserId") + .HasColumnType("uuid") + .HasColumnName("ImpersonatorUserId"); + + b.Property("ImpersonatorUserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("ImpersonatorUserName"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("TenantName"); + + b.Property("Url") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("Url"); + + b.Property("UserId") + .HasColumnType("uuid") + .HasColumnName("UserId"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "ExecutionTime"); + + b.HasIndex("TenantId", "UserId", "ExecutionTime"); + + b.ToTable("AbpAuditLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("AuditLogId") + .HasColumnType("uuid") + .HasColumnName("AuditLogId"); + + b.Property("ExecutionDuration") + .HasColumnType("integer") + .HasColumnName("ExecutionDuration"); + + b.Property("ExecutionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("ExecutionTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("MethodName") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("MethodName"); + + b.Property("Parameters") + .HasMaxLength(2000) + .HasColumnType("character varying(2000)") + .HasColumnName("Parameters"); + + b.Property("ServiceName") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("ServiceName"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); + + b.ToTable("AbpAuditLogActions", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("AuditLogId") + .HasColumnType("uuid") + .HasColumnName("AuditLogId"); + + b.Property("ChangeTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("ChangeTime"); + + b.Property("ChangeType") + .HasColumnType("smallint") + .HasColumnName("ChangeType"); + + b.Property("EntityId") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("EntityId"); + + b.Property("EntityTenantId") + .HasColumnType("uuid"); + + b.Property("EntityTypeFullName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("EntityTypeFullName"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("AuditLogId"); + + b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); + + b.ToTable("AbpEntityChanges", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("EntityChangeId") + .HasColumnType("uuid"); + + b.Property("NewValue") + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("NewValue"); + + b.Property("OriginalValue") + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("OriginalValue"); + + b.Property("PropertyName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("PropertyName"); + + b.Property("PropertyTypeFullName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("PropertyTypeFullName"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("EntityChangeId"); + + b.ToTable("AbpEntityPropertyChanges", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsAbandoned") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false); + + b.Property("JobArgs") + .IsRequired() + .HasMaxLength(1048576) + .HasColumnType("character varying(1048576)"); + + b.Property("JobName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("LastTryTime") + .HasColumnType("timestamp without time zone"); + + b.Property("NextTryTime") + .HasColumnType("timestamp without time zone"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasDefaultValue((byte)15); + + b.Property("TryCount") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasDefaultValue((short)0); + + b.HasKey("Id"); + + b.HasIndex("IsAbandoned", "NextTryTime"); + + b.ToTable("AbpBackgroundJobs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpFeatureValues", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Description") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsStatic") + .HasColumnType("boolean"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("Regex") + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("RegexDescription") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("Required") + .HasColumnType("boolean"); + + b.Property("ValueType") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.ToTable("AbpClaimTypes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("SourceTenantId") + .HasColumnType("uuid"); + + b.Property("SourceUserId") + .HasColumnType("uuid"); + + b.Property("TargetTenantId") + .HasColumnType("uuid"); + + b.Property("TargetUserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") + .IsUnique(); + + b.ToTable("AbpLinkUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDefault") + .HasColumnType("boolean") + .HasColumnName("IsDefault"); + + b.Property("IsPublic") + .HasColumnType("boolean") + .HasColumnName("IsPublic"); + + b.Property("IsStatic") + .HasColumnType("boolean") + .HasColumnName("IsStatic"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("NormalizedName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName"); + + b.ToTable("AbpRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.Property("RoleId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AbpRoleClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Action") + .HasMaxLength(96) + .HasColumnType("character varying(96)"); + + b.Property("ApplicationName") + .HasMaxLength(96) + .HasColumnType("character varying(96)"); + + b.Property("BrowserInfo") + .HasMaxLength(512) + .HasColumnType("character varying(512)"); + + b.Property("ClientId") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ClientIpAddress") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CorrelationId") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("Identity") + .HasMaxLength(96) + .HasColumnType("character varying(96)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("TenantName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Action"); + + b.HasIndex("TenantId", "ApplicationName"); + + b.HasIndex("TenantId", "Identity"); + + b.HasIndex("TenantId", "UserId"); + + b.ToTable("AbpSecurityLogs", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("AccessFailedCount") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(0) + .HasColumnName("AccessFailedCount"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("Email"); + + b.Property("EmailConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("EmailConfirmed"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsActive") + .HasColumnType("boolean") + .HasColumnName("IsActive"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsExternal") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsExternal"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LockoutEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("LockoutEnabled"); + + b.Property("LockoutEnd") + .HasColumnType("timestamp with time zone"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("Name"); + + b.Property("NormalizedEmail") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("NormalizedEmail"); + + b.Property("NormalizedUserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("NormalizedUserName"); + + b.Property("PasswordHash") + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("PasswordHash"); + + b.Property("PhoneNumber") + .HasMaxLength(16) + .HasColumnType("character varying(16)") + .HasColumnName("PhoneNumber"); + + b.Property("PhoneNumberConfirmed") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("PhoneNumberConfirmed"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("SecurityStamp"); + + b.Property("Surname") + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("Surname"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("TwoFactorEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("TwoFactorEnabled"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)") + .HasColumnName("UserName"); + + b.HasKey("Id"); + + b.HasIndex("Email"); + + b.HasIndex("NormalizedEmail"); + + b.HasIndex("NormalizedUserName"); + + b.HasIndex("UserName"); + + b.ToTable("AbpUsers", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ClaimType") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("ClaimValue") + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AbpUserClaims", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderDisplayName") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(196) + .HasColumnType("character varying(196)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "LoginProvider"); + + b.HasIndex("LoginProvider", "ProviderKey"); + + b.ToTable("AbpUserLogins", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uuid"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "UserId"); + + b.HasIndex("UserId", "OrganizationUnitId"); + + b.ToTable("AbpUserOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("RoleId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId", "UserId"); + + b.ToTable("AbpUserRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("LoginProvider") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Name") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.Property("Value") + .HasColumnType("text"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AbpUserTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(95) + .HasColumnType("character varying(95)") + .HasColumnName("Code"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("DisplayName"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsPeis") + .HasMaxLength(1) + .HasColumnType("character varying(1)"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uuid"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code"); + + b.HasIndex("ParentId"); + + b.ToTable("AbpOrganizationUnits", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.Property("OrganizationUnitId") + .HasColumnType("uuid"); + + b.Property("RoleId") + .HasColumnType("uuid"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("OrganizationUnitId", "RoleId"); + + b.HasIndex("RoleId", "OrganizationUnitId"); + + b.ToTable("AbpOrganizationUnitRoles", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ClientId") + .HasMaxLength(100) + .HasColumnType("character varying(100)"); + + b.Property("ClientSecret") + .HasColumnType("text"); + + b.Property("ClientUri") + .HasColumnType("text"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConsentType") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("DisplayName") + .HasColumnType("text"); + + b.Property("DisplayNames") + .HasColumnType("text"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("LogoUri") + .HasColumnType("text"); + + b.Property("Permissions") + .HasColumnType("text"); + + b.Property("PostLogoutRedirectUris") + .HasColumnType("text"); + + b.Property("Properties") + .HasColumnType("text"); + + b.Property("RedirectUris") + .HasColumnType("text"); + + b.Property("Requirements") + .HasColumnType("text"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("OpenIddictApplications", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ApplicationId") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("timestamp without time zone"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Properties") + .HasColumnType("text"); + + b.Property("Scopes") + .HasColumnType("text"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("character varying(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictAuthorizations", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Scopes.OpenIddictScope", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("text"); + + b.Property("Descriptions") + .HasColumnType("text"); + + b.Property("DisplayName") + .HasColumnType("text"); + + b.Property("DisplayNames") + .HasColumnType("text"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(200) + .HasColumnType("character varying(200)"); + + b.Property("Properties") + .HasColumnType("text"); + + b.Property("Resources") + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("OpenIddictScopes", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ApplicationId") + .HasColumnType("uuid"); + + b.Property("AuthorizationId") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationDate") + .HasColumnType("timestamp without time zone"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExpirationDate") + .HasColumnType("timestamp without time zone"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Payload") + .HasColumnType("text"); + + b.Property("Properties") + .HasColumnType("text"); + + b.Property("RedemptionDate") + .HasColumnType("timestamp without time zone"); + + b.Property("ReferenceId") + .HasMaxLength(100) + .HasColumnType("character varying(100)"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("character varying(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.HasKey("Id"); + + b.HasIndex("AuthorizationId"); + + b.HasIndex("ReferenceId"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictTokens", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("TenantId") + .HasColumnType("uuid") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpPermissionGrants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("ProviderKey") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("ProviderName") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("character varying(2048)"); + + b.HasKey("Id"); + + b.HasIndex("Name", "ProviderName", "ProviderKey") + .IsUnique(); + + b.ToTable("AbpSettings", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("character varying(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uuid") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uuid") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("text") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("timestamp without time zone") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uuid") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.HasKey("Id"); + + b.HasIndex("Name"); + + b.ToTable("AbpTenants", (string)null); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.Property("TenantId") + .HasColumnType("uuid"); + + b.Property("Name") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)"); + + b.HasKey("TenantId", "Name"); + + b.ToTable("AbpTenantConnectionStrings", (string)null); + }); + + modelBuilder.Entity("ChildDiagnosis", b => + { + b.HasOne("Shentun.Peis.Models.Diagnosis", null) + .WithMany() + .HasForeignKey("DiagnosisId") + .IsRequired() + .HasConstraintName("fk_child_diagnosis_diagnosis1"); + + b.HasOne("Shentun.Peis.Models.Diagnosis", null) + .WithMany() + .HasForeignKey("ParentDiagnosisId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_child_diagnosis_diagnosis"); + }); + + modelBuilder.Entity("RoomAsbitem", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", null) + .WithMany() + .HasForeignKey("AsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_room_asbitem_asbitem"); + + b.HasOne("Shentun.Peis.Models.Room", null) + .WithMany() + .HasForeignKey("RoomId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_room_asbitem_room"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.HelloA", b => + { + b.HasOne("Shentun.Peis.Books.HelloType", "HelloType") + .WithMany("HelloAs") + .HasForeignKey("HelloTypeId") + .IsRequired() + .HasConstraintName("fk_hello_a_hello_type"); + + b.Navigation("HelloType"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.TestB", b => + { + b.HasOne("Shentun.Peis.Books.TestA", "TestAs") + .WithMany("TestBs") + .HasForeignKey("TestAsAId"); + + b.Navigation("TestAs"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Asbitem", b => + { + b.HasOne("Shentun.Peis.Models.InvoiceItemType", "InvoiceItemType") + .WithMany("Asbitems") + .HasForeignKey("InvoiceItemTypeId") + .IsRequired() + .HasConstraintName("fk_asbitem_invoice_item_type"); + + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("Asbitems") + .HasForeignKey("ItemTypeId") + .IsRequired() + .HasConstraintName("fk_asbitem_item_type"); + + b.Navigation("InvoiceItemType"); + + b.Navigation("ItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.AsbitemDetail", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithMany("AsbitemDetails") + .HasForeignKey("AsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_asbitem_detail_asbitem"); + + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("AsbitemDetails") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_asbitem_detail_item"); + + b.Navigation("Asbitem"); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultConclusion", b => + { + b.HasOne("Shentun.Peis.Models.BigtextResultTemplate", "BigtextResultTemplate") + .WithMany("BigtextResultConclusions") + .HasForeignKey("BigtextResultTemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_bigtext"); + + b.Navigation("BigtextResultTemplate"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultDescription", b => + { + b.HasOne("Shentun.Peis.Models.BigtextResultTemplate", "BigtextResultTemplate") + .WithMany("BigtextResultDescriptions") + .HasForeignKey("BigtextResultTemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_bigtext"); + + b.Navigation("BigtextResultTemplate"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultTemplate", b => + { + b.HasOne("Shentun.Peis.Models.BigtextResultType", "BigtextResultType") + .WithMany("BigtextResultTemplates") + .HasForeignKey("BigtextResultTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_bigtext"); + + b.Navigation("BigtextResultType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultType", b => + { + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("BigtextResultTypes") + .HasForeignKey("ItemTypeId") + .IsRequired() + .HasConstraintName("fk_bigtext"); + + b.Navigation("ItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardBill", b => + { + b.HasOne("Shentun.Peis.Models.CardRegister", "CardRegister") + .WithMany("CardBills") + .HasForeignKey("CardRegisterId") + .IsRequired() + .HasConstraintName("fk_card_bil_reference_card_reg"); + + b.HasOne("Shentun.Peis.Models.PayMode", "PayMode") + .WithMany("CardBills") + .HasForeignKey("PayModeId") + .HasConstraintName("fk_card_bill_payment_mode"); + + b.Navigation("CardRegister"); + + b.Navigation("PayMode"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardRegister", b => + { + b.HasOne("Shentun.Peis.Models.CardType", "CardType") + .WithMany("CardRegisters") + .HasForeignKey("CardTypeId") + .IsRequired() + .HasConstraintName("fk_card_reg_reference_card_typ"); + + b.HasOne("Shentun.Peis.Models.Department", "OrganizationUnit") + .WithMany("CardRegisters") + .HasForeignKey("OrganizationUnitId") + .IsRequired() + .HasConstraintName("fk_card_register_department"); + + b.Navigation("CardType"); + + b.Navigation("OrganizationUnit"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Charge", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("Charges") + .HasForeignKey("PatientRegisterId") + .IsRequired() + .HasConstraintName("fk_patient_register_charge"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeAsbitem", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithMany("ChargeAsbitems") + .HasForeignKey("AsbitemId") + .IsRequired() + .HasConstraintName("fk_charge_asbitem_asbitem"); + + b.HasOne("Shentun.Peis.Models.Charge", "Charge") + .WithMany("ChargeAsbitems") + .HasForeignKey("ChargeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_charge_asbitem_charge"); + + b.Navigation("Asbitem"); + + b.Navigation("Charge"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeBack", b => + { + b.HasOne("Shentun.Peis.Models.Charge", "Charge") + .WithMany("ChargeBacks") + .HasForeignKey("ChargeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_bill_bac_reference_bill"); + + b.Navigation("Charge"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeBackPay", b => + { + b.HasOne("Shentun.Peis.Models.ChargeBack", "ChargeBack") + .WithMany("ChargeBackPays") + .HasForeignKey("ChargeBackId") + .IsRequired() + .HasConstraintName("fk_charge_back_pay_charge_back"); + + b.HasOne("Shentun.Peis.Models.PayMode", "PayMode") + .WithMany("ChargeBackPays") + .HasForeignKey("PayModeId") + .IsRequired() + .HasConstraintName("fk_charge_back_pay_pay_mode"); + + b.Navigation("ChargeBack"); + + b.Navigation("PayMode"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargePay", b => + { + b.HasOne("Shentun.Peis.Models.Charge", "Charge") + .WithMany("ChargePays") + .HasForeignKey("ChargeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_charge_payment_mode_charge"); + + b.HasOne("Shentun.Peis.Models.PayMode", "PayMode") + .WithMany("ChargePays") + .HasForeignKey("PayModeId") + .IsRequired() + .HasConstraintName("fk_charge_"); + + b.Navigation("Charge"); + + b.Navigation("PayMode"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargePriceItem", b => + { + b.HasOne("Shentun.Peis.Models.ChargeAsbitem", "ChargeAsbitem") + .WithMany("ChargePriceItems") + .HasForeignKey("ChargeAsbitemId") + .IsRequired() + .HasConstraintName("fk_charge_asbitem"); + + b.Navigation("ChargeAsbitem"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CommonChar", b => + { + b.HasOne("Shentun.Peis.Models.CommonCharType", "CommonCharType") + .WithMany("CommonChars") + .HasForeignKey("CommonCharTypeId") + .IsRequired() + .HasConstraintName("fk_common_char_common_char_type"); + + b.Navigation("CommonCharType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ContactMethod", b => + { + b.HasOne("Shentun.Peis.Models.ContactPerson", "ContactPerson") + .WithMany("ContactMethods") + .HasForeignKey("ContactPersonId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_contact_method_contact"); + + b.Navigation("ContactPerson"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ContactPerson", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrg", "CustomerOrg") + .WithMany("ContactPeople") + .HasForeignKey("CustomerOrgId") + .IsRequired() + .HasConstraintName("fk_contact_org"); + + b.Navigation("CustomerOrg"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CriticalValue", b => + { + b.HasOne("Shentun.Peis.Models.CriticalValueType", "CriticalValueType") + .WithMany("CriticalValues") + .HasForeignKey("CriticalValueTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_critica"); + + b.Navigation("CriticalValueType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgCharge", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgRegister", "CustomerOrgRegister") + .WithMany("CustomerOrgCharges") + .HasForeignKey("CustomerOrgRegisterId") + .IsRequired() + .HasConstraintName("fk_customer_org_charge_register"); + + b.Navigation("CustomerOrgRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargeBack", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgCharge", "CustomerOrgCharge") + .WithMany("CustomerOrgChargeBacks") + .HasForeignKey("CustomerOrgChargeId") + .IsRequired() + .HasConstraintName("fk_org_charge_back_org_charge"); + + b.Navigation("CustomerOrgCharge"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargeBackPay", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgChargeBack", "CustomerOrgChargeBack") + .WithMany("CustomerOrgChargeBackPays") + .HasForeignKey("CustomerOrgChargeBackId") + .IsRequired() + .HasConstraintName("fk_org_cha"); + + b.HasOne("Shentun.Peis.Models.PayMode", "PayMode") + .WithMany("CustomerOrgChargeBackPays") + .HasForeignKey("PayModeId") + .IsRequired() + .HasConstraintName("fk_org_charge_back_pay_pay_mode"); + + b.Navigation("CustomerOrgChargeBack"); + + b.Navigation("PayMode"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargePay", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgCharge", "CustomerOrgCharge") + .WithOne("CustomerOrgChargePay") + .HasForeignKey("Shentun.Peis.Models.CustomerOrgChargePay", "Id") + .IsRequired() + .HasConstraintName("fk_org_charge_pay_org_charge"); + + b.HasOne("Shentun.Peis.Models.PayMode", "PayMode") + .WithMany("CustomerOrgChargePays") + .HasForeignKey("PayModeId") + .HasConstraintName("fk_org_charge_pay_pay_mode"); + + b.Navigation("CustomerOrgCharge"); + + b.Navigation("PayMode"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgGroup", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgRegister", "CustomerOrgRegister") + .WithMany("CustomerOrgGroups") + .HasForeignKey("CustomerOrgRegisterId") + .IsRequired() + .HasConstraintName("fk_customer_org_group_register"); + + b.Navigation("CustomerOrgRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgGroupDetail", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithMany("CustomerOrgGroupDetails") + .HasForeignKey("AsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_org_group_detail_asbitem"); + + b.HasOne("Shentun.Peis.Models.CustomerOrgGroup", "CustomerOrgGroup") + .WithMany("CustomerOrgGroupDetails") + .HasForeignKey("CustomerOrgGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_org_group_detail_org_group"); + + b.Navigation("Asbitem"); + + b.Navigation("CustomerOrgGroup"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgRegister", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrg", "CustomerOrg") + .WithMany("CustomerOrgRegisters") + .HasForeignKey("CustomerOrgId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_org_medi_reference_org"); + + b.Navigation("CustomerOrg"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Diagnosis", b => + { + b.HasOne("Shentun.Peis.Models.DiagnosisLevel", "DiagnosisLevel") + .WithMany("Diagnoses") + .HasForeignKey("DiagnosisLevelId") + .IsRequired() + .HasConstraintName("fk_diagnosis_diagnosis_level"); + + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("Diagnoses") + .HasForeignKey("ItemTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_diagnosis_item_type"); + + b.Navigation("DiagnosisLevel"); + + b.Navigation("ItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisTemplateDetail", b => + { + b.HasOne("Shentun.Peis.Models.Diagnosis", "Diagnosis") + .WithMany("DiagnosisTemplateDetails") + .HasForeignKey("DiagnosisId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_diagnos"); + + b.HasOne("Shentun.Peis.Models.DiagnosisTemplate", "DiagnosisTemplate") + .WithMany("DiagnosisTemplateDetails") + .HasForeignKey("DiagnosisTemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_diagno2"); + + b.Navigation("Diagnosis"); + + b.Navigation("DiagnosisTemplate"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.HealthCertificate", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithOne("HealthCertificate") + .HasForeignKey("Shentun.Peis.Models.HealthCertificate", "Id") + .IsRequired() + .HasConstraintName("fk_health_"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Item", b => + { + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("Items") + .HasForeignKey("ItemTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_item_type"); + + b.Navigation("ItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultMatch", b => + { + b.HasOne("Shentun.Peis.Models.Diagnosis", "Diagnosis") + .WithMany("ItemResultMatches") + .HasForeignKey("DiagnosisId") + .IsRequired() + .HasConstraintName("fk_item_result_match_diagnosis"); + + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("ItemResultMatches") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_res_reference_item1"); + + b.Navigation("Diagnosis"); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultTemplate", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("ItemResultTemplates") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_res_reference_item"); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemResultTemplateType", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("ItemResultTemplateTypes") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_re"); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemTemplateDetail", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("ItemTemplateDetails") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_template_detail_item"); + + b.HasOne("Shentun.Peis.Models.ItemTemplate", "ItemTemplate") + .WithMany("ItemTemplateDetails") + .HasForeignKey("ItemTemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_item_te"); + + b.Navigation("Item"); + + b.Navigation("ItemTemplate"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemType", b => + { + b.HasOne("Shentun.Peis.Models.GuideType", "GuidType") + .WithMany("ItemTypes") + .HasForeignKey("GuidTypeId") + .IsRequired() + .HasConstraintName("fk_item_type_guide_type"); + + b.HasOne("Shentun.Peis.Models.MedicalReportType", "MedicalReportType") + .WithMany("ItemTypes") + .HasForeignKey("MedicalReportTypeId") + .IsRequired() + .HasConstraintName("fk_item_ty"); + + b.Navigation("GuidType"); + + b.Navigation("MedicalReportType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.LisRequest", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("LisRequests") + .HasForeignKey("PatientRegisterId") + .IsRequired() + .HasConstraintName("fk_lis_request_patient_register"); + + b.HasOne("Shentun.Peis.Models.SampleContainer", "SampleContainer") + .WithMany("LisRequests") + .HasForeignKey("SampleContainerId") + .IsRequired() + .HasConstraintName("fk_lis_request_sample_container"); + + b.HasOne("Shentun.Peis.Models.SampleType", "SampleType") + .WithMany("LisRequests") + .HasForeignKey("SampleTypeId") + .IsRequired() + .HasConstraintName("fk_lis_request_sample_type"); + + b.Navigation("PatientRegister"); + + b.Navigation("SampleContainer"); + + b.Navigation("SampleType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalConclusion", b => + { + b.HasOne("Shentun.Peis.Models.MedicalConclusionType", "MedicalConclusionType") + .WithMany("MedicalConclusions") + .HasForeignKey("MedicalConclusionTypeId") + .HasConstraintName("fk_medical"); + + b.Navigation("MedicalConclusionType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalPackageDetail", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithMany("MedicalPackageDetails") + .HasForeignKey("AsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_medical"); + + b.HasOne("Shentun.Peis.Models.MedicalPackage", "MedicalPackage") + .WithMany("MedicalPackageDetails") + .HasForeignKey("MedicalPackageId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_medica2"); + + b.Navigation("Asbitem"); + + b.Navigation("MedicalPackage"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.OrganizationUnitsCustomerOrg", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrg", "CustomerOrg") + .WithMany("OrganizationUnitsCustomerOrgs") + .HasForeignKey("CustomerOrgId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_medical_center_org_org"); + + b.HasOne("Shentun.Peis.Models.Department", "OrganizationUnit") + .WithMany("OrganizationUnitsCustomerOrgs") + .HasForeignKey("OrganizationUnitId") + .IsRequired() + .HasConstraintName("fk_medical"); + + b.Navigation("CustomerOrg"); + + b.Navigation("OrganizationUnit"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientOccupationalDisease", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithOne("PatientOccupationalDisease") + .HasForeignKey("Shentun.Peis.Models.PatientOccupationalDisease", "Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_patient"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientOccupationalHistory", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("PatientOccupationalHistories") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_occupat"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientPoison", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("PatientPoisons") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_patient"); + + b.HasOne("Shentun.Peis.Models.Poison", "Poison") + .WithMany("PatientPoisons") + .HasForeignKey("PoisonId") + .IsRequired() + .HasConstraintName("fk_patient_poison_poison"); + + b.Navigation("PatientRegister"); + + b.Navigation("Poison"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientRegister", b => + { + b.HasOne("Shentun.Peis.Models.CustomerOrgRegister", "CustomerOrgRegister") + .WithMany("PatientRegisters") + .HasForeignKey("CustomerOrgRegisterId") + .IsRequired() + .HasConstraintName("fk_patient_register_org_register"); + + b.HasOne("Shentun.Peis.Models.MaritalStatus", "MaritalStatus") + .WithMany("PatientRegisters") + .HasForeignKey("MaritalStatusId") + .IsRequired() + .HasConstraintName("fk_patient_register_marital_status_id"); + + b.Navigation("CustomerOrgRegister"); + + b.Navigation("MaritalStatus"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientSymptom", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("PatientSymptoms") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_patient"); + + b.HasOne("Shentun.Peis.Models.Symptom", "Symptom") + .WithMany("PatientSymptoms") + .HasForeignKey("SymptomId") + .IsRequired() + .HasConstraintName("fk_patient_symptom_symptom"); + + b.Navigation("PatientRegister"); + + b.Navigation("Symptom"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PhoneFollow", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("PhoneFollows") + .HasForeignKey("PatientRegisterId") + .IsRequired() + .HasConstraintName("fk_phone_f"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Poison", b => + { + b.HasOne("Shentun.Peis.Models.PoisonType", "PoisonType") + .WithMany("Poisons") + .HasForeignKey("PoisonTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_poison_poison_type"); + + b.Navigation("PoisonType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PriceItem", b => + { + b.HasOne("Shentun.Peis.Models.InvoiceItemType", "InvoiceItemType") + .WithMany("PriceItems") + .HasForeignKey("InvoiceItemTypeId") + .IsRequired() + .HasConstraintName("fk_price_item_invoice_item_type"); + + b.Navigation("InvoiceItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.QueueRegister", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("QueueRegisters") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_queue_r"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ReferenceRange", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("ReferenceRanges") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_referenc_reference_item"); + + b.Navigation("Item"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterAsbitem", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithMany("RegisterAsbitems") + .HasForeignKey("AsbitemId") + .IsRequired() + .HasConstraintName("fk_register_reference_asbitem"); + + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("RegisterAsbitems") + .HasForeignKey("PatientRegisterId") + .IsRequired() + .HasConstraintName("fk_register_reference_patient_"); + + b.HasOne("Shentun.Peis.Models.RegisterCheck", "RegisterCheck") + .WithMany("RegisterAsbitems") + .HasForeignKey("RegisterCheckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_registe"); + + b.Navigation("Asbitem"); + + b.Navigation("PatientRegister"); + + b.Navigation("RegisterCheck"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckItem", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("RegisterCheckItems") + .HasForeignKey("ItemId") + .IsRequired() + .HasConstraintName("fk_register_reference_item"); + + b.HasOne("Shentun.Peis.Models.RegisterCheck", "RegisterCheck") + .WithMany("RegisterCheckItems") + .HasForeignKey("RegisterCheckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_register_item_register_check"); + + b.HasOne("Shentun.Peis.Models.ResultStatus", "ResultStatus") + .WithMany("RegisterCheckItems") + .HasForeignKey("ResultStatusId") + .HasConstraintName("fk_register_item_result_status"); + + b.Navigation("Item"); + + b.Navigation("RegisterCheck"); + + b.Navigation("ResultStatus"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckPicture", b => + { + b.HasOne("Shentun.Peis.Models.RegisterCheck", "RegisterCheck") + .WithMany("RegisterCheckPictures") + .HasForeignKey("RegisterCheckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_check_picture_register_check"); + + b.Navigation("RegisterCheck"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckSuggestion", b => + { + b.HasOne("Shentun.Peis.Models.RegisterCheck", "RegisterCheck") + .WithMany("RegisterCheckSuggestions") + .HasForeignKey("RegisterCheckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_registe"); + + b.Navigation("RegisterCheck"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckSummary", b => + { + b.HasOne("Shentun.Peis.Models.RegisterCheck", "RegisterCheck") + .WithMany("RegisterCheckSummaries") + .HasForeignKey("RegisterCheckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_registe"); + + b.Navigation("RegisterCheck"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Room", b => + { + b.HasOne("Shentun.Peis.Models.Department", "Department") + .WithMany("Rooms") + .HasForeignKey("DepartmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_room_department"); + + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("Rooms") + .HasForeignKey("ItemTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_room_item_type"); + + b.Navigation("Department"); + + b.Navigation("ItemType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleGroup", b => + { + b.HasOne("Shentun.Peis.Models.SampleContainer", "SampleContainer") + .WithMany("SampleGroups") + .HasForeignKey("SampleContainerId") + .IsRequired() + .HasConstraintName("fk_sample_"); + + b.HasOne("Shentun.Peis.Models.SampleType", "SampleType") + .WithMany("SampleGroups") + .HasForeignKey("SampleTypeId") + .IsRequired() + .HasConstraintName("fk_sample_group_sample_type"); + + b.Navigation("SampleContainer"); + + b.Navigation("SampleType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleGroupDetail", b => + { + b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") + .WithOne("SampleGroupDetail") + .HasForeignKey("Shentun.Peis.Models.SampleGroupDetail", "AsbitemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sample_group_detail_asbitem"); + + b.HasOne("Shentun.Peis.Models.SampleGroup", "SampleGroup") + .WithMany("SampleGroupDetails") + .HasForeignKey("SampleGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sample_"); + + b.Navigation("Asbitem"); + + b.Navigation("SampleGroup"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ServiceTrade", b => + { + b.HasOne("Shentun.Peis.Models.Department", "Department") + .WithMany("ServiceTrades") + .HasForeignKey("DepartmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_service_trades_department"); + + b.Navigation("Department"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SexHormoneReferenceRange", b => + { + b.HasOne("Shentun.Peis.Models.Item", "Item") + .WithMany("SexHormoneReferenceRanges") + .HasForeignKey("ItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sex_hor"); + + b.HasOne("Shentun.Peis.Models.SexHormoneTerm", "SexHormoneTerm") + .WithMany("SexHormoneReferenceRanges") + .HasForeignKey("SexHormoneTermId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sex_ho2"); + + b.Navigation("Item"); + + b.Navigation("SexHormoneTerm"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Suggestion", b => + { + b.HasOne("Shentun.Peis.Models.Diagnosis", "Diagnosis") + .WithMany("Suggestions") + .HasForeignKey("DiagnosisId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_suggestion_diagnosis"); + + b.Navigation("Diagnosis"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumDiagnosis", b => + { + b.HasOne("Shentun.Peis.Models.Diagnosis", "Diagnosis") + .WithMany("SumDiagnoses") + .HasForeignKey("DiagnosisId") + .IsRequired() + .HasConstraintName("fk_sum_diagnosis_diagnosis"); + + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("SumDiagnoses") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sum_dia"); + + b.Navigation("Diagnosis"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSuggestionContent", b => + { + b.HasOne("Shentun.Peis.Models.SumSuggestionHeader", "SumSuggestionHeader") + .WithMany("SumSuggestionContents") + .HasForeignKey("SumSuggestionHeaderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sum_sug"); + + b.Navigation("SumSuggestionHeader"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSuggestionHeader", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("SumSuggestionHeaders") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sum_sug"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSummaryContent", b => + { + b.HasOne("Shentun.Peis.Models.SumSummaryHeader", "SumSummaryHeader") + .WithMany("SumSummaryContents") + .HasForeignKey("SumSummaryHeaderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sum_sum"); + + b.Navigation("SumSummaryHeader"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSummaryHeader", b => + { + b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") + .WithMany("SumSummaryHeaders") + .HasForeignKey("PatientRegisterId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_sum_sum"); + + b.Navigation("PatientRegister"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParm", b => + { + b.HasOne("Shentun.Peis.Models.SysParmType", "SysParmType") + .WithMany("SysParms") + .HasForeignKey("SysParmTypeId") + .HasConstraintName("fk_sys_parm_sys_parm_type"); + + b.Navigation("SysParmType"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmValue", b => + { + b.HasOne("Shentun.Peis.Models.SysParm", "SysParm") + .WithMany("SysParmValues") + .HasForeignKey("SysParmId") + .IsRequired() + .HasConstraintName("fk_sys_parm_value_sys_parm"); + + b.Navigation("SysParm"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmValueOption", b => + { + b.HasOne("Shentun.Peis.Models.SysParm", "SysParm") + .WithMany("SysParmValueOptions") + .HasForeignKey("SysParmId") + .IsRequired() + .HasConstraintName("fk_sys_par"); + + b.Navigation("SysParm"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.User", b => + { + b.HasOne("Shentun.Peis.Models.Department", "Department") + .WithMany("Users") + .HasForeignKey("DepartmentId") + .IsRequired() + .HasConstraintName("fk_user_department"); + + b.Navigation("Department"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserDepartment", b => + { + b.HasOne("Shentun.Peis.Models.Department", "Department") + .WithMany("UserDepartments") + .HasForeignKey("DepartmentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_op"); + + b.HasOne("Shentun.Peis.Models.User", "User") + .WithMany("UserDepartments") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_o2"); + + b.Navigation("Department"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserGrouping", b => + { + b.HasOne("Shentun.Peis.Models.Grouping", "Grouping") + .WithMany("UserGroupings") + .HasForeignKey("GroupingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_grouping_grouping"); + + b.HasOne("Shentun.Peis.Models.User", "User") + .WithMany("UserGroupings") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_grouping_users"); + + b.Navigation("Grouping"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.UserItemType", b => + { + b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") + .WithMany("UserItemTypes") + .HasForeignKey("ItemTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_item_type_item_type"); + + b.HasOne("Shentun.Peis.Models.User", "User") + .WithMany("UserItemTypes") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("fk_user_item_type_users"); + + b.Navigation("ItemType"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("Actions") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) + .WithMany("EntityChanges") + .HasForeignKey("AuditLogId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => + { + b.HasOne("Volo.Abp.AuditLogging.EntityChange", null) + .WithMany("PropertyChanges") + .HasForeignKey("EntityChangeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany("Claims") + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Claims") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Logins") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("OrganizationUnits") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => + { + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Roles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => + { + b.HasOne("Volo.Abp.Identity.IdentityUser", null) + .WithMany("Tokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany() + .HasForeignKey("ParentId"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => + { + b.HasOne("Volo.Abp.Identity.OrganizationUnit", null) + .WithMany("Roles") + .HasForeignKey("OrganizationUnitId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Volo.Abp.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + }); + + modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => + { + b.HasOne("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", null) + .WithMany() + .HasForeignKey("ApplicationId"); + + b.HasOne("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", null) + .WithMany() + .HasForeignKey("AuthorizationId"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => + { + b.HasOne("Volo.Abp.TenantManagement.Tenant", null) + .WithMany("ConnectionStrings") + .HasForeignKey("TenantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Shentun.Peis.Books.HelloType", b => + { + b.Navigation("HelloAs"); + }); + + modelBuilder.Entity("Shentun.Peis.Books.TestA", b => + { + b.Navigation("TestBs"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Asbitem", b => + { + b.Navigation("AsbitemDetails"); + + b.Navigation("ChargeAsbitems"); + + b.Navigation("CustomerOrgGroupDetails"); + + b.Navigation("MedicalPackageDetails"); + + b.Navigation("RegisterAsbitems"); + + b.Navigation("SampleGroupDetail"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultTemplate", b => + { + b.Navigation("BigtextResultConclusions"); + + b.Navigation("BigtextResultDescriptions"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.BigtextResultType", b => + { + b.Navigation("BigtextResultTemplates"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardRegister", b => + { + b.Navigation("CardBills"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CardType", b => + { + b.Navigation("CardRegisters"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Charge", b => + { + b.Navigation("ChargeAsbitems"); + + b.Navigation("ChargeBacks"); + + b.Navigation("ChargePays"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeAsbitem", b => + { + b.Navigation("ChargePriceItems"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ChargeBack", b => + { + b.Navigation("ChargeBackPays"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CommonCharType", b => + { + b.Navigation("CommonChars"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ContactPerson", b => + { + b.Navigation("ContactMethods"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CriticalValueType", b => + { + b.Navigation("CriticalValues"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrg", b => + { + b.Navigation("ContactPeople"); + + b.Navigation("CustomerOrgRegisters"); + + b.Navigation("OrganizationUnitsCustomerOrgs"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgCharge", b => + { + b.Navigation("CustomerOrgChargeBacks"); + + b.Navigation("CustomerOrgChargePay"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgChargeBack", b => + { + b.Navigation("CustomerOrgChargeBackPays"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgGroup", b => + { + b.Navigation("CustomerOrgGroupDetails"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.CustomerOrgRegister", b => + { + b.Navigation("CustomerOrgCharges"); + + b.Navigation("CustomerOrgGroups"); + + b.Navigation("PatientRegisters"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Department", b => + { + b.Navigation("CardRegisters"); + + b.Navigation("OrganizationUnitsCustomerOrgs"); + + b.Navigation("Rooms"); + + b.Navigation("ServiceTrades"); + + b.Navigation("UserDepartments"); + + b.Navigation("Users"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Diagnosis", b => + { + b.Navigation("DiagnosisTemplateDetails"); + + b.Navigation("ItemResultMatches"); + + b.Navigation("Suggestions"); + + b.Navigation("SumDiagnoses"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisLevel", b => + { + b.Navigation("Diagnoses"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.DiagnosisTemplate", b => + { + b.Navigation("DiagnosisTemplateDetails"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Grouping", b => + { + b.Navigation("UserGroupings"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.GuideType", b => + { + b.Navigation("ItemTypes"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.InvoiceItemType", b => + { + b.Navigation("Asbitems"); + + b.Navigation("PriceItems"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Item", b => + { + b.Navigation("AsbitemDetails"); + + b.Navigation("ItemResultMatches"); + + b.Navigation("ItemResultTemplateTypes"); + + b.Navigation("ItemResultTemplates"); + + b.Navigation("ItemTemplateDetails"); + + b.Navigation("ReferenceRanges"); + + b.Navigation("RegisterCheckItems"); + + b.Navigation("SexHormoneReferenceRanges"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemTemplate", b => + { + b.Navigation("ItemTemplateDetails"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ItemType", b => + { + b.Navigation("Asbitems"); + + b.Navigation("BigtextResultTypes"); + + b.Navigation("Diagnoses"); + + b.Navigation("Items"); + + b.Navigation("Rooms"); + + b.Navigation("UserItemTypes"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MaritalStatus", b => + { + b.Navigation("PatientRegisters"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalConclusionType", b => + { + b.Navigation("MedicalConclusions"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalPackage", b => + { + b.Navigation("MedicalPackageDetails"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.MedicalReportType", b => + { + b.Navigation("ItemTypes"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PatientRegister", b => + { + b.Navigation("Charges"); + + b.Navigation("HealthCertificate"); + + b.Navigation("LisRequests"); + + b.Navigation("PatientOccupationalDisease"); + + b.Navigation("PatientOccupationalHistories"); + + b.Navigation("PatientPoisons"); + + b.Navigation("PatientSymptoms"); + + b.Navigation("PhoneFollows"); + + b.Navigation("QueueRegisters"); + + b.Navigation("RegisterAsbitems"); + + b.Navigation("SumDiagnoses"); + + b.Navigation("SumSuggestionHeaders"); + + b.Navigation("SumSummaryHeaders"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PayMode", b => + { + b.Navigation("CardBills"); + + b.Navigation("ChargeBackPays"); + + b.Navigation("ChargePays"); + + b.Navigation("CustomerOrgChargeBackPays"); + + b.Navigation("CustomerOrgChargePays"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Poison", b => + { + b.Navigation("PatientPoisons"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.PoisonType", b => + { + b.Navigation("Poisons"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.RegisterCheck", b => + { + b.Navigation("RegisterAsbitems"); + + b.Navigation("RegisterCheckItems"); + + b.Navigation("RegisterCheckPictures"); + + b.Navigation("RegisterCheckSuggestions"); + + b.Navigation("RegisterCheckSummaries"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.ResultStatus", b => + { + b.Navigation("RegisterCheckItems"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleContainer", b => + { + b.Navigation("LisRequests"); + + b.Navigation("SampleGroups"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleGroup", b => + { + b.Navigation("SampleGroupDetails"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SampleType", b => + { + b.Navigation("LisRequests"); + + b.Navigation("SampleGroups"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SexHormoneTerm", b => + { + b.Navigation("SexHormoneReferenceRanges"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSuggestionHeader", b => + { + b.Navigation("SumSuggestionContents"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SumSummaryHeader", b => + { + b.Navigation("SumSummaryContents"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.Symptom", b => + { + b.Navigation("PatientSymptoms"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParm", b => + { + b.Navigation("SysParmValueOptions"); + + b.Navigation("SysParmValues"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.SysParmType", b => + { + b.Navigation("SysParms"); + }); + + modelBuilder.Entity("Shentun.Peis.Models.User", b => + { + b.Navigation("UserDepartments"); + + b.Navigation("UserGroupings"); + + b.Navigation("UserItemTypes"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => + { + b.Navigation("Actions"); + + b.Navigation("EntityChanges"); + }); + + modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => + { + b.Navigation("PropertyChanges"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => + { + b.Navigation("Claims"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => + { + b.Navigation("Claims"); + + b.Navigation("Logins"); + + b.Navigation("OrganizationUnits"); + + b.Navigation("Roles"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => + { + b.Navigation("Roles"); + }); + + modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => + { + b.Navigation("ConnectionStrings"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230625015549_i062505_zhushi.cs b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230625015549_i062505_zhushi.cs new file mode 100644 index 00000000..e32e66cb --- /dev/null +++ b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230625015549_i062505_zhushi.cs @@ -0,0 +1,6732 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Shentun.Peis.Migrations +{ + public partial class i062505_zhushi : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterTable( + name: "users", + comment: "用户表,废弃"); + + migrationBuilder.AlterTable( + name: "user_rights", + comment: "用户控件权限-废弃"); + + migrationBuilder.AlterTable( + name: "user_grouping", + comment: "用户组权限-废弃"); + + migrationBuilder.AlterTable( + name: "user_department", + comment: "用户科室操作权限,废弃", + oldComment: "用户科室操作权限"); + + migrationBuilder.AlterTable( + name: "sysdiagrams", + comment: "不是本软件的表,估计是系统自动生成的"); + + migrationBuilder.AlterTable( + name: "sms_type", + comment: "短信类别"); + + migrationBuilder.AlterTable( + name: "sms_template", + comment: "短信模板"); + + migrationBuilder.AlterTable( + name: "sms_send", + comment: "短信发送"); + + migrationBuilder.AlterTable( + name: "primarykey_builder", + comment: "主键产生器,废弃", + oldComment: "主键产生器"); + + migrationBuilder.AlterTable( + name: "patient_symptom", + comment: "职业病-体检病人症状"); + + migrationBuilder.AlterTable( + name: "operate_log", + comment: "操作日志,已经废弃", + oldComment: "操作日志"); + + migrationBuilder.AlterTable( + name: "grouping", + comment: "废弃"); + + migrationBuilder.AlterTable( + name: "for_sex", + comment: "适用性别设置,固定编码", + oldComment: "可支持性别设置"); + + migrationBuilder.AlterTable( + name: "follow_up_type", + comment: "随访类别"); + + migrationBuilder.AlterTable( + name: "follow_up_plan", + comment: "随访计划"); + + migrationBuilder.AlterTable( + name: "follow_up_mode", + comment: "随访方式"); + + migrationBuilder.AlterTable( + name: "department", + comment: "部门,已经废弃", + oldComment: "部门"); + + migrationBuilder.AlterTable( + name: "customer_org_type", + comment: "客户单位类别", + oldComment: "团体类型设置"); + + migrationBuilder.AlterTable( + name: "contact_method", + comment: "联系方式新增量主键,更新映射关系", + oldComment: "联系方式"); + + migrationBuilder.AlterColumn( + name: "item_type_id", + table: "user_item_type", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "项目类别ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "value_option_name", + table: "sys_parm_value_option", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "可选项名", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "value_option", + table: "sys_parm_value_option", + type: "character varying(50)", + maxLength: 50, + nullable: false, + comment: "可选项", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "remark", + table: "sys_parm_value", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "备注", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "parm_value", + table: "sys_parm_value", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "参数值", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "organization_unit_id", + table: "sys_parm_value", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "单位ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "sys_parm_id", + table: "sys_parm_value", + type: "character varying(50)", + maxLength: 50, + nullable: false, + comment: "参数ID", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "parent_id", + table: "sys_parm_type", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "父ID", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "value_type", + table: "sys_parm", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "结果类别", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "sys_parm_type_id", + table: "sys_parm", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "参数类别ID", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "remark", + table: "sys_parm", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "备注", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "sys_parm", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "参数名", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "template_content", + table: "summary_template", + type: "character varying(200)", + maxLength: 200, + nullable: true, + comment: "模板内容", + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "summary_title", + table: "sum_summary_header", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "综述标题", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "summary_flag", + table: "sum_summary_header", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "综述标志", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "patient_register_id", + table: "sum_summary_header", + type: "uuid", + nullable: false, + comment: "病人登记ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "summary_content", + table: "sum_summary_content", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "建议内容", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "sum_summary_header_id", + table: "sum_summary_content", + type: "uuid", + nullable: false, + comment: "建议头ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "suggestion_title", + table: "sum_suggestion_header", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "建议标题", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "suggestion_flag", + table: "sum_suggestion_header", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "建议标志", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "patient_register_id", + table: "sum_suggestion_header", + type: "uuid", + nullable: false, + comment: "病人登记ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "sum_suggestion_header_id", + table: "sum_suggestion_content", + type: "uuid", + nullable: false, + comment: "建议头ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "suggestion_content", + table: "sum_suggestion_content", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "建议内容", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "sum_suggestion_header_id", + table: "sum_diagnosis", + type: "uuid", + nullable: false, + comment: "建议头ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "diagnosis_id", + table: "sum_diagnosis", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "诊断ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "patient_register_id", + table: "sum_diagnosis", + type: "uuid", + nullable: false, + comment: "病人登记ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "suggestion_content", + table: "suggestion", + type: "character varying(200)", + maxLength: 200, + nullable: true, + comment: "建议内容", + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "diagnosis_id", + table: "suggestion", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "诊断ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "sms_type_id", + table: "sms_template", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "短信类别ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "content", + table: "sms_template", + type: "character varying(200)", + maxLength: 200, + nullable: true, + comment: "短信内容", + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "sms_type_id", + table: "sms_send", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "短信类别ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "patient_name", + table: "sms_send", + type: "character varying(16)", + maxLength: 16, + nullable: true, + comment: "姓名", + oldClrType: typeof(string), + oldType: "character varying(16)", + oldMaxLength: 16, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "patient_id", + table: "sms_send", + type: "uuid", + maxLength: 10, + nullable: true, + comment: "人员ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldMaxLength: 10, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "mobile_telephone", + table: "sms_send", + type: "character varying(11)", + maxLength: 11, + nullable: true, + comment: "手机号", + oldClrType: typeof(string), + oldType: "character varying(11)", + oldMaxLength: 11, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "is_complete", + table: "sms_send", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是完成", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "follow_up_plan_id", + table: "sms_send", + type: "uuid", + nullable: true, + comment: "随访计划ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "content", + table: "sms_send", + type: "character varying(200)", + maxLength: 200, + nullable: true, + comment: "短信内容", + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "upper_diagnosis_id", + table: "sex_hormone_reference_range", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "上限诊断", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "sex_hormone_term_id", + table: "sex_hormone_reference_range", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "性激素期限ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "reference_range_value", + table: "sex_hormone_reference_range", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "参考范围", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "lower_diagnosis_id", + table: "sex_hormone_reference_range", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "下限诊断", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "item_id", + table: "sex_hormone_reference_range", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "项目编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "critical_range_value", + table: "sex_hormone_reference_range", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "危急值参考范围", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "age_upper_limit", + table: "sex_hormone_reference_range", + type: "smallint", + nullable: false, + defaultValueSql: "200", + comment: "年龄上限", + oldClrType: typeof(short), + oldType: "smallint", + oldDefaultValueSql: "200"); + + migrationBuilder.AlterColumn( + name: "age_lower_limit", + table: "sex_hormone_reference_range", + type: "smallint", + nullable: false, + comment: "年龄下限", + oldClrType: typeof(short), + oldType: "smallint"); + + migrationBuilder.AlterColumn( + name: "is_complete", + table: "settle_account", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是完成", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "completed_time", + table: "settle_account", + type: "timestamp without time zone", + nullable: true, + comment: "结账时间", + oldClrType: typeof(DateTime), + oldType: "timestamp without time zone", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "completed_by", + table: "settle_account", + type: "character varying(16)", + maxLength: 16, + nullable: true, + comment: "结账人", + oldClrType: typeof(string), + oldType: "character varying(16)", + oldMaxLength: 16, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "asbitem_id", + table: "sample_group_detail", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "组合项目编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "sample_type_id", + table: "sample_group", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "标本类型ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "sample_container_id", + table: "sample_group", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "标本容器ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "container_color_name", + table: "sample_container", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "颜色名", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "container_color", + table: "sample_container", + type: "integer", + nullable: false, + comment: "颜色", + oldClrType: typeof(int), + oldType: "integer"); + + migrationBuilder.AlterColumn( + name: "item_type_id", + table: "room", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "项目类别编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "department_id", + table: "room", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "report_prompt", + table: "result_status", + type: "character varying(8)", + maxLength: 8, + nullable: true, + comment: "报告单提示", + oldClrType: typeof(string), + oldType: "character varying(8)", + oldMaxLength: 8, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "report_font_color", + table: "result_status", + type: "integer", + nullable: false, + comment: "报告单字体颜色", + oldClrType: typeof(int), + oldType: "integer"); + + migrationBuilder.AlterColumn( + name: "report_background_color", + table: "result_status", + type: "integer", + nullable: false, + defaultValueSql: "16777215", + comment: "报告单背景颜色", + oldClrType: typeof(int), + oldType: "integer", + oldDefaultValueSql: "16777215"); + + migrationBuilder.AlterColumn( + name: "data_input_prompt", + table: "result_status", + type: "character varying(8)", + maxLength: 8, + nullable: true, + comment: "数据录入提示", + oldClrType: typeof(string), + oldType: "character varying(8)", + oldMaxLength: 8, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "data_input_font_color", + table: "result_status", + type: "integer", + nullable: false, + comment: "数据录入字体颜色", + oldClrType: typeof(int), + oldType: "integer"); + + migrationBuilder.AlterColumn( + name: "data_input_background_color", + table: "result_status", + type: "integer", + nullable: false, + defaultValueSql: "16777215", + comment: "数据录入报告单颜色", + oldClrType: typeof(int), + oldType: "integer", + oldDefaultValueSql: "16777215"); + + migrationBuilder.AlterColumn( + name: "summary_flag", + table: "register_check_summary", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "综述标志", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "summary", + table: "register_check_summary", + type: "character varying(500)", + maxLength: 500, + nullable: true, + comment: "综述", + oldClrType: typeof(string), + oldType: "character varying(500)", + oldMaxLength: 500, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "register_check_id", + table: "register_check_summary", + type: "uuid", + nullable: false, + comment: "登记检查ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "display_order", + table: "register_check_summary", + type: "integer", + nullable: false, + comment: "顺序", + oldClrType: typeof(int), + oldType: "integer"); + + migrationBuilder.AlterColumn( + name: "suggestion", + table: "register_check_suggestion", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "建议", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "register_check_id", + table: "register_check_suggestion", + type: "uuid", + nullable: false, + comment: "登记检查ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "display_order", + table: "register_check_suggestion", + type: "integer", + nullable: false, + comment: "显示顺序", + oldClrType: typeof(int), + oldType: "integer"); + + migrationBuilder.AlterColumn( + name: "unit", + table: "register_check_item", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "单位", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "critical_value", + table: "register_check_item", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "危急值", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "critical_range_value", + table: "register_check_item", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "危急值范围", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "item_id", + table: "register_check_item", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "项目编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "项目"); + + migrationBuilder.AlterColumn( + name: "register_check_id", + table: "register_check_critical_value", + type: "uuid", + nullable: false, + comment: "登记检查ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "process_type_flag", + table: "register_check_critical_value", + type: "character(1)", + maxLength: 1, + nullable: true, + comment: "处理类别标志", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "item_id", + table: "register_check_critical_value", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "项目编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "is_complete", + table: "register_check_critical_value", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是否完成", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "doctor", + table: "register_check_critical_value", + type: "character varying(16)", + maxLength: 16, + nullable: true, + comment: "处理医生", + oldClrType: typeof(string), + oldType: "character varying(16)", + oldMaxLength: 16, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "critical_value", + table: "register_check_critical_value", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "危急值", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "third_info", + table: "register_check", + type: "character varying(80)", + maxLength: 80, + nullable: true, + comment: "第三方信息", + oldClrType: typeof(string), + oldType: "character varying(80)", + oldMaxLength: 80, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "is_lock", + table: "register_check", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是否锁住", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_audit", + table: "register_check", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是审核", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "critical_value_process_flag", + table: "register_check", + type: "character(1)", + maxLength: 1, + nullable: true, + comment: "危急值处理标志", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "critical_value_process_doctor", + table: "register_check", + type: "character varying(16)", + maxLength: 16, + nullable: true, + comment: "危急值处理医生", + oldClrType: typeof(string), + oldType: "character varying(16)", + oldMaxLength: 16, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "critical_value_process_date", + table: "register_check", + type: "date", + nullable: true, + comment: "危急值处理日期", + oldClrType: typeof(DateOnly), + oldType: "date", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "critical_value_process_content", + table: "register_check", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "危急值处理内容", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "critical_value_flag", + table: "register_check", + type: "character(1)", + maxLength: 1, + nullable: true, + defaultValueSql: "0", + comment: "危急值标志", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldNullable: true, + oldDefaultValueSql: "0"); + + migrationBuilder.AlterColumn( + name: "critical_value_create_date", + table: "register_check", + type: "date", + nullable: true, + comment: "危急值创建日期", + oldClrType: typeof(DateOnly), + oldType: "date", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "critical_value", + table: "register_check", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "危急值", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "complete_flag", + table: "register_check", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "0", + comment: "完成标志", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "0"); + + migrationBuilder.AlterColumn( + name: "check_request_print_times", + table: "register_check", + type: "smallint", + nullable: false, + comment: "检查申请单打印次数", + oldClrType: typeof(short), + oldType: "smallint"); + + migrationBuilder.AlterColumn( + name: "check_request_no", + table: "register_check", + type: "uuid", + maxLength: 20, + nullable: false, + comment: "检查单号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldMaxLength: 20); + + migrationBuilder.AlterColumn( + name: "check_doctor_id", + table: "register_check", + type: "uuid", + nullable: false, + comment: "检查医生ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "check_date", + table: "register_check", + type: "date", + nullable: true, + comment: "检查日期", + oldClrType: typeof(DateOnly), + oldType: "date", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "auditor_user_id", + table: "register_check", + type: "uuid", + nullable: true, + comment: "审核医生ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "audit_time", + table: "register_check", + type: "timestamp without time zone", + nullable: true, + comment: "审核时间", + oldClrType: typeof(DateTime), + oldType: "timestamp without time zone", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "register_asbitem_id", + table: "register_asbitem", + type: "uuid", + nullable: true, + comment: "主键", + oldClrType: typeof(Guid), + oldType: "uuid", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "lis_request_id", + table: "register_asbitem", + type: "uuid", + maxLength: 20, + nullable: false, + comment: "LIS申请ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldMaxLength: 20); + + migrationBuilder.AlterColumn( + name: "amount", + table: "register_asbitem", + type: "smallint", + nullable: true, + comment: "数量", + oldClrType: typeof(short), + oldType: "smallint", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "register_check_id", + table: "register_asbitem", + type: "uuid", + nullable: false, + comment: "检查单ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "reference_range_type_flag", + table: "reference_range", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "参考范围类别0-无参考范围,1-数字型,2-字符型,3-性激素", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "room_id", + table: "queue_register", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "房间ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "patient_register_id", + table: "queue_register", + type: "uuid", + nullable: false, + comment: "病人登记ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "no_complete_reason", + table: "queue_register", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "0", + comment: "未完成原因", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "0"); + + migrationBuilder.AlterColumn( + name: "display_order", + table: "queue_register", + type: "integer", + nullable: false, + comment: "排队顺序", + oldClrType: typeof(int), + oldType: "integer"); + + migrationBuilder.AlterColumn( + name: "complete_flag", + table: "queue_register", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "0", + comment: "完成标志", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "0"); + + migrationBuilder.AlterColumn( + name: "call_time", + table: "queue_register", + type: "timestamp without time zone", + nullable: true, + comment: "叫号时间", + oldClrType: typeof(DateTime), + oldType: "timestamp without time zone", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "price_item_code", + table: "price_item", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "价表编码", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "price", + table: "price_item", + type: "numeric(10,2)", + precision: 10, + scale: 2, + nullable: false, + comment: "价格", + oldClrType: typeof(decimal), + oldType: "numeric(10,2)", + oldPrecision: 10, + oldScale: 2); + + migrationBuilder.AlterColumn( + name: "invoice_item_type_id", + table: "price_item", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "发票项目类别ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "price_item", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "reply_content", + table: "phone_follow", + type: "character varying(200)", + maxLength: 200, + nullable: true, + comment: "回复内容", + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "patient_register_id", + table: "phone_follow", + type: "uuid", + nullable: false, + comment: "病人登记ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "follow_up_plan_id", + table: "phone_follow", + type: "uuid", + nullable: true, + comment: "随访计划ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "follow_content", + table: "phone_follow", + type: "character varying(200)", + maxLength: 200, + nullable: true, + comment: "随访内容", + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "id", + table: "pay_mode", + type: "character(4)", + fixedLength: true, + maxLength: 4, + nullable: false, + comment: "编号,固定编码", + oldClrType: typeof(string), + oldType: "character(4)", + oldFixedLength: true, + oldMaxLength: 4); + + migrationBuilder.AlterColumn( + name: "third_info", + table: "patient_register", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "附加第三方信息", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "sex_hormone_term_id", + table: "patient_register", + type: "uuid", + nullable: false, + comment: "性激素期限", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "remark", + table: "patient_register", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "备注", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "organization_unit_id", + table: "patient_register", + type: "uuid", + nullable: false, + comment: "体检中心ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "medical_card_no", + table: "patient_register", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "体检卡号", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "is_vip", + table: "patient_register", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "vip客户", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_upload", + table: "patient_register", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是否上传到WEB", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_recover_guide", + table: "patient_register", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "指引单收回", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_phone_follow", + table: "patient_register", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "电话随访", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_name_hide", + table: "patient_register", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "隐藏姓名", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_lock", + table: "patient_register", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "锁住", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_audit", + table: "patient_register", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "审核", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "guide_print_times", + table: "patient_register", + type: "smallint", + nullable: false, + comment: "指引单打印次数", + oldClrType: typeof(short), + oldType: "smallint"); + + migrationBuilder.AlterColumn( + name: "customer_org_register_id", + table: "patient_register", + type: "uuid", + nullable: false, + comment: "客户单位登记ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "birth_date", + table: "patient_register", + type: "date", + nullable: true, + comment: "出生日期", + oldClrType: typeof(DateOnly), + oldType: "date", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "audit_doctor", + table: "patient_register", + type: "character varying(16)", + maxLength: 16, + nullable: true, + comment: "审核医生", + oldClrType: typeof(string), + oldType: "character varying(16)", + oldMaxLength: 16, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "audit_date", + table: "patient_register", + type: "date", + nullable: true, + comment: "审核日期", + oldClrType: typeof(DateOnly), + oldType: "date", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "telephone", + table: "patient", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "电话", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "sex_id", + table: "patient", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "性别", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "postal_code", + table: "patient", + type: "character varying(10)", + maxLength: 10, + nullable: true, + comment: "邮政编码", + oldClrType: typeof(string), + oldType: "character varying(10)", + oldMaxLength: 10, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "patient_password", + table: "patient", + type: "character varying(10)", + maxLength: 10, + nullable: true, + comment: "登录密码", + oldClrType: typeof(string), + oldType: "character varying(10)", + oldMaxLength: 10, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "nation_id", + table: "patient", + type: "uuid", + fixedLength: true, + nullable: true, + comment: "民族编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "mobile_telephone", + table: "patient", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "手机号", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "marital_status_id", + table: "patient", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "婚姻状况", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "id_no", + table: "patient", + type: "character varying(18)", + maxLength: 18, + nullable: true, + comment: "身份证号", + oldClrType: typeof(string), + oldType: "character varying(18)", + oldMaxLength: 18, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "email", + table: "patient", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "email", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "patient", + type: "character varying(30)", + maxLength: 30, + nullable: true, + comment: "姓名", + oldClrType: typeof(string), + oldType: "character varying(30)", + oldMaxLength: 30, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "birth_place_id", + table: "patient", + type: "uuid", + fixedLength: true, + nullable: true, + comment: "出生地", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "birth_date", + table: "patient", + type: "date", + nullable: true, + comment: "出生日期", + oldClrType: typeof(DateOnly), + oldType: "date", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "address", + table: "patient", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "地址", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "organization_unit_id", + table: "organization_units_customer_org", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "体检中心编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "customer_org_id", + table: "organization_units_customer_org", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "客户单位编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "medical_report_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "asbitem_id", + table: "medical_package_detail", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "组合项目编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "sign_in_time", + table: "lis_request", + type: "date", + nullable: true, + comment: "签收时间", + oldClrType: typeof(DateOnly), + oldType: "date", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "sign_in_person", + table: "lis_request", + type: "character varying(16)", + maxLength: 16, + nullable: true, + comment: "签收人姓名", + oldClrType: typeof(string), + oldType: "character varying(16)", + oldMaxLength: 16, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "sign_in_order", + table: "lis_request", + type: "integer", + nullable: true, + comment: "签收顺序", + oldClrType: typeof(int), + oldType: "integer", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "sampling_time", + table: "lis_request", + type: "date", + nullable: true, + comment: "采样时间", + oldClrType: typeof(DateOnly), + oldType: "date", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "sampler", + table: "lis_request", + type: "character varying(16)", + maxLength: 16, + nullable: true, + comment: "采样人姓名", + oldClrType: typeof(string), + oldType: "character varying(16)", + oldMaxLength: 16, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "sample_type_id", + table: "lis_request", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "标本类型", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "sample_container_id", + table: "lis_request", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "标本容器编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "patient_register_id", + table: "lis_request", + type: "uuid", + nullable: false, + comment: "病人登记ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "lis_request_no", + table: "lis_request", + type: "uuid", + nullable: false, + comment: "检验申请单号", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "is_sign_in", + table: "lis_request", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是签收", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_print", + table: "lis_request", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是否已打印", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "simple_code", + table: "item_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "自定义简码", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "path_code", + table: "item_type", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "路径编码", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "parent_id", + table: "item_type", + type: "uuid", + fixedLength: true, + nullable: true, + comment: "父id", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "medical_report_type_id", + table: "item_type", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "体检报告类别", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "is_merge_asbitem", + table: "item_type", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "合并组合项目,Y-是,N-否", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "guid_type_id", + table: "item_type", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "指引类别", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "item_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "check_type_flag", + table: "item_type", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "'G'::bpchar", + comment: "检查类别,0-普通检查,1-检验,2-影像检查", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "'G'::bpchar"); + + migrationBuilder.AlterColumn( + name: "item_id", + table: "item_template_detail", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "项目编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "item_default_result", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "unit_id", + table: "item", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "单位", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "result_template_type_flag", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "0", + comment: "结果模板类别标志", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "0"); + + migrationBuilder.AlterColumn( + name: "reference_range_type_flag", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "'E'::bpchar", + comment: "参考范围类别0-无参考范围,1-数字型,2-字符型,3-性激素", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "'E'::bpchar"); + + migrationBuilder.AlterColumn( + name: "price_item_id", + table: "item", + type: "uuid", + fixedLength: true, + maxLength: 8, + nullable: false, + comment: "价表项目编码", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldMaxLength: 8); + + migrationBuilder.AlterColumn( + name: "price", + table: "item", + type: "numeric(10,2)", + precision: 10, + scale: 2, + nullable: false, + comment: "价格", + oldClrType: typeof(decimal), + oldType: "numeric(10,2)", + oldPrecision: 10, + oldScale: 2); + + migrationBuilder.AlterColumn( + name: "item_type_id", + table: "item", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "项目类别", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "is_produce_summary", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是生成小结", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_name_into_summary", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "名称进入小结", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_diagnosis_function", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "启用诊断函数", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_continue_process", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是继续处理", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_calculation_item", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是计算项目", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_active", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "启用", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "input_check", + table: "item", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "输入结果校验公式", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "english_short_name", + table: "item", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "英文缩写", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "item", + type: "character varying(30)", + maxLength: 30, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(30)", + oldMaxLength: 30, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "diagnosis_function", + table: "item", + type: "character varying(2000)", + maxLength: 2000, + nullable: true, + comment: "诊断函数", + oldClrType: typeof(string), + oldType: "character varying(2000)", + oldMaxLength: 2000, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "default_result", + table: "item", + type: "character varying(200)", + maxLength: 200, + nullable: true, + comment: "默认结果", + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "calculation_function", + table: "item", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "计算函数", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "invoice_org", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "invoice_item_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "guide_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "follow_up_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "remark", + table: "follow_up_plan", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "备注", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "perfom_user_id", + table: "follow_up_plan", + type: "uuid", + nullable: false, + comment: "执行者用户ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "perfom_time", + table: "follow_up_plan", + type: "timestamp without time zone", + nullable: true, + comment: "执行时间", + oldClrType: typeof(DateTime), + oldType: "timestamp without time zone", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "perfom_flag", + table: "follow_up_plan", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "执行标志", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_loop", + table: "follow_up_plan", + type: "character(1)", + maxLength: 1, + nullable: true, + comment: "是否循环", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "follow_up_type_id", + table: "follow_up_plan", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "随访类别", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "follow_up_mode_id", + table: "follow_up_plan", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "随访方式", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "doctor_user_id", + table: "follow_up_plan", + type: "uuid", + nullable: false, + comment: "医生", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "cycle_days", + table: "follow_up_plan", + type: "smallint", + nullable: false, + comment: "周期天数", + oldClrType: typeof(short), + oldType: "smallint"); + + migrationBuilder.AlterColumn( + name: "content", + table: "follow_up_plan", + type: "character varying(200)", + maxLength: 200, + nullable: true, + comment: "随访内容", + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "follow_up_mode", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "path_code", + table: "diagnosis_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "路径编码", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "parent_id", + table: "diagnosis_type", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "父编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "diagnosis_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "diagnosis_id", + table: "diagnosis_template_detail", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "诊断编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "diagnosis_template_id", + table: "diagnosis_template_detail", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "诊断模板编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "diagnosis_template", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "diagnosis_postfix", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "suggestion_name", + table: "diagnosis", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "建议名称", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "item_type_id", + table: "diagnosis", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "项目类别", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "is_summary_template", + table: "diagnosis", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是总检模板", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_ill", + table: "diagnosis", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是疾病", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "for_sex_id", + table: "diagnosis", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "'A'::bpchar", + comment: "适用性别", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "'A'::bpchar"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "diagnosis", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "diagnosis_level_id", + table: "diagnosis", + type: "uuid", + nullable: false, + comment: "诊断级别", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "customer_org_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "register_no", + table: "customer_org_register", + type: "character varying(12)", + maxLength: 12, + nullable: true, + comment: "计划号", + oldClrType: typeof(string), + oldType: "character varying(12)", + oldMaxLength: 12, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "register_name", + table: "customer_org_register", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "计划名称", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "price", + table: "customer_org_group_detail", + type: "numeric(10,2)", + precision: 10, + scale: 2, + nullable: false, + comment: "价格", + oldClrType: typeof(decimal), + oldType: "numeric(10,2)", + oldPrecision: 10, + oldScale: 2); + + migrationBuilder.AlterColumn( + name: "asbitem_id", + table: "customer_org_group_detail", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "组合项目编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "customer_org_group_id", + table: "customer_org_group_detail", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "分组编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "pay_mode_id", + table: "customer_org_charge_pay", + type: "character(4)", + fixedLength: true, + maxLength: 4, + nullable: true, + comment: "支付方式", + oldClrType: typeof(string), + oldType: "character(4)", + oldFixedLength: true, + oldMaxLength: 4, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "charge_money", + table: "customer_org_charge_pay", + type: "numeric(10,2)", + precision: 10, + scale: 2, + nullable: false, + comment: "支付金额", + oldClrType: typeof(decimal), + oldType: "numeric(10,2)", + oldPrecision: 10, + oldScale: 2); + + migrationBuilder.AlterColumn( + name: "back_moeny", + table: "customer_org_charge_back_pay", + type: "numeric(10,2)", + precision: 10, + scale: 2, + nullable: false, + comment: "退费金额", + oldClrType: typeof(decimal), + oldType: "numeric(10,2)", + oldPrecision: 10, + oldScale: 2); + + migrationBuilder.AlterColumn( + name: "pay_mode_id", + table: "customer_org_charge_back_pay", + type: "character(4)", + fixedLength: true, + maxLength: 4, + nullable: false, + comment: "支付方式", + oldClrType: typeof(string), + oldType: "character(4)", + oldFixedLength: true, + oldMaxLength: 4); + + migrationBuilder.AlterColumn( + name: "settle_account_id", + table: "customer_org_charge_back", + type: "uuid", + nullable: true, + comment: "结算账户ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "customer_org_charge_id", + table: "customer_org_charge_back", + type: "uuid", + nullable: false, + comment: "收费编号", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "settle_account_id", + table: "customer_org_charge", + type: "uuid", + nullable: false, + comment: "结算账户ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "payer", + table: "customer_org_charge", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "付款人", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "customer_org_register_id", + table: "customer_org_charge", + type: "uuid", + nullable: false, + comment: "客户单位登记ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "charge_flag", + table: "customer_org_charge", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "收退费标志", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "status_flag", + table: "customer_org", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "0", + comment: "状态", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "0"); + + migrationBuilder.AlterColumn( + name: "short_name", + table: "customer_org", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "简称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "path_code", + table: "customer_org", + type: "character varying(60)", + maxLength: 60, + nullable: true, + comment: "路径编码", + oldClrType: typeof(string), + oldType: "character varying(60)", + oldMaxLength: 60, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "parent_id", + table: "customer_org", + type: "uuid", + fixedLength: true, + nullable: true, + comment: "父编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "is_lock", + table: "customer_org", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "锁住", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "invoice_name", + table: "customer_org", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "开票名称", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "path_code", + table: "critical_value_type", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "路径编码", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "parent_id", + table: "critical_value_type", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "父编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "critical_value_type", + type: "character varying(40)", + maxLength: 40, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(40)", + oldMaxLength: 40, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "critical_value", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "critical_value_type_id", + table: "critical_value", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "危急值类别编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "title", + table: "contact_person", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "职务", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "remark", + table: "contact_person", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "备注", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "contact_person", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "姓名", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "customer_org_id", + table: "contact_person", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "客户单位编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "contact_method_value", + table: "contact_method", + type: "character varying(15)", + maxLength: 15, + nullable: true, + comment: "联系方式,比如18911254911,839860190@qq.com", + oldClrType: typeof(string), + oldType: "character varying(15)", + oldMaxLength: 15, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "contact_method_type", + table: "contact_method", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "'M'::bpchar", + comment: "联系方式类别-比如0-手机、1-电子邮箱", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "'M'::bpchar"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "common_char_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "common_char", + type: "character varying(1)", + maxLength: 1, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(1)", + oldMaxLength: 1, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "common_char_type_id", + table: "common_char", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "常用字符类别编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "back_moeny", + table: "charge_back_pay", + type: "numeric(10,2)", + precision: 10, + scale: 2, + nullable: false, + comment: "退费金额", + oldClrType: typeof(decimal), + oldType: "numeric(10,2)", + oldPrecision: 10, + oldScale: 2); + + migrationBuilder.AlterColumn( + name: "pay_mode_id", + table: "charge_back_pay", + type: "character(4)", + fixedLength: true, + maxLength: 4, + nullable: false, + comment: "支付方式ID", + oldClrType: typeof(string), + oldType: "character(4)", + oldFixedLength: true, + oldMaxLength: 4); + + migrationBuilder.AlterColumn( + name: "settle_account_id", + table: "charge_back", + type: "uuid", + nullable: false, + comment: "结账ID", + oldClrType: typeof(Guid), + oldType: "uuid"); + + migrationBuilder.AlterColumn( + name: "country_code", + table: "birth_place", + type: "character varying(6)", + maxLength: 6, + nullable: true, + comment: "国家标准码", + oldClrType: typeof(string), + oldType: "character varying(6)", + oldMaxLength: 6, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "path_code", + table: "bigtext_result_type", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "路径编码", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "parent_id", + table: "bigtext_result_type", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "父编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "item_type_id", + table: "bigtext_result_type", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "项目类别", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "bigtext_result_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "bigtext_result_template", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "bigtext_result_type_id", + table: "bigtext_result_template", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "结果类别编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "description", + table: "bigtext_result_description", + type: "character varying(200)", + maxLength: 200, + nullable: true, + comment: "描述", + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "conclusion", + table: "bigtext_result_conclusion", + type: "character varying(200)", + maxLength: 200, + nullable: true, + comment: "结论", + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "price_item_id", + table: "asbitem_price_item", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "价表项目编码", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "asbitem_id", + table: "asbitem_price_item", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "组合项目编号", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "amount", + table: "asbitem_price_item", + type: "smallint", + nullable: true, + comment: "数量", + oldClrType: typeof(short), + oldType: "smallint", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "guide", + table: "asbitem_guide", + type: "character varying(50)", + maxLength: 50, + nullable: true, + comment: "指引单内容", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "for_sex_id", + table: "asbitem_guide", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "适用性别ID", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "asbitem_id", + table: "asbitem_guide", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "组合项目ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "organization_unit_id", + table: "asbitem_guide", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "单位科室ID", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "item_id", + table: "asbitem_detail", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "项目编码", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "short_name", + table: "asbitem", + type: "character varying(20)", + maxLength: 20, + nullable: true, + comment: "简称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "queue_time", + table: "asbitem", + type: "numeric(3,1)", + precision: 3, + scale: 1, + nullable: false, + comment: "候诊时间", + oldClrType: typeof(decimal), + oldType: "numeric(3,1)", + oldPrecision: 3, + oldScale: 1); + + migrationBuilder.AlterColumn( + name: "price", + table: "asbitem", + type: "numeric(8,2)", + precision: 8, + scale: 2, + nullable: false, + comment: "价格", + oldClrType: typeof(decimal), + oldType: "numeric(8,2)", + oldPrecision: 8, + oldScale: 2); + + migrationBuilder.AlterColumn( + name: "item_type_id", + table: "asbitem", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "项目类别", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "is_picture_rotate", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "体检报告图片旋转90°", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_item_result_merger", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "项目结果合并", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_diagnosis_function", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "启用诊断函数", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_continue_process", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "诊断函数处理完毕后继续处理", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_check", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是检查项目", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_before_eat", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "餐前项目", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "is_active", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + comment: "是启用", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1); + + migrationBuilder.AlterColumn( + name: "invoice_item_type_id", + table: "asbitem", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "发票类别", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "for_sex_id", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "'A'::bpchar", + comment: "适用性别,M-男,F-女,A-全部", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "'A'::bpchar"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "asbitem", + type: "character varying(30)", + maxLength: 30, + nullable: true, + comment: "名称", + oldClrType: typeof(string), + oldType: "character varying(30)", + oldMaxLength: 30, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "diagnosis_function", + table: "asbitem", + type: "character varying(1000)", + maxLength: 1000, + nullable: true, + comment: "诊断函数", + oldClrType: typeof(string), + oldType: "character varying(1000)", + oldMaxLength: 1000, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "device_type_id", + table: "asbitem", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "仪器类别", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true); + + migrationBuilder.AlterColumn( + name: "default_result", + table: "asbitem", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "默认结果", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "clinical_meaning", + table: "asbitem", + type: "character varying(100)", + maxLength: 100, + nullable: true, + comment: "临床意义", + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterTable( + name: "users", + oldComment: "用户表,废弃"); + + migrationBuilder.AlterTable( + name: "user_rights", + oldComment: "用户控件权限-废弃"); + + migrationBuilder.AlterTable( + name: "user_grouping", + oldComment: "用户组权限-废弃"); + + migrationBuilder.AlterTable( + name: "user_department", + comment: "用户科室操作权限", + oldComment: "用户科室操作权限,废弃"); + + migrationBuilder.AlterTable( + name: "sysdiagrams", + oldComment: "不是本软件的表,估计是系统自动生成的"); + + migrationBuilder.AlterTable( + name: "sms_type", + oldComment: "短信类别"); + + migrationBuilder.AlterTable( + name: "sms_template", + oldComment: "短信模板"); + + migrationBuilder.AlterTable( + name: "sms_send", + oldComment: "短信发送"); + + migrationBuilder.AlterTable( + name: "primarykey_builder", + comment: "主键产生器", + oldComment: "主键产生器,废弃"); + + migrationBuilder.AlterTable( + name: "patient_symptom", + oldComment: "职业病-体检病人症状"); + + migrationBuilder.AlterTable( + name: "operate_log", + comment: "操作日志", + oldComment: "操作日志,已经废弃"); + + migrationBuilder.AlterTable( + name: "grouping", + oldComment: "废弃"); + + migrationBuilder.AlterTable( + name: "for_sex", + comment: "可支持性别设置", + oldComment: "适用性别设置,固定编码"); + + migrationBuilder.AlterTable( + name: "follow_up_type", + oldComment: "随访类别"); + + migrationBuilder.AlterTable( + name: "follow_up_plan", + oldComment: "随访计划"); + + migrationBuilder.AlterTable( + name: "follow_up_mode", + oldComment: "随访方式"); + + migrationBuilder.AlterTable( + name: "department", + comment: "部门", + oldComment: "部门,已经废弃"); + + migrationBuilder.AlterTable( + name: "customer_org_type", + comment: "团体类型设置", + oldComment: "客户单位类别"); + + migrationBuilder.AlterTable( + name: "contact_method", + comment: "联系方式", + oldComment: "联系方式新增量主键,更新映射关系"); + + migrationBuilder.AlterColumn( + name: "item_type_id", + table: "user_item_type", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "项目类别ID"); + + migrationBuilder.AlterColumn( + name: "value_option_name", + table: "sys_parm_value_option", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "可选项名"); + + migrationBuilder.AlterColumn( + name: "value_option", + table: "sys_parm_value_option", + type: "character varying(50)", + maxLength: 50, + nullable: false, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldComment: "可选项"); + + migrationBuilder.AlterColumn( + name: "remark", + table: "sys_parm_value", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "备注"); + + migrationBuilder.AlterColumn( + name: "parm_value", + table: "sys_parm_value", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "参数值"); + + migrationBuilder.AlterColumn( + name: "organization_unit_id", + table: "sys_parm_value", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "单位ID"); + + migrationBuilder.AlterColumn( + name: "sys_parm_id", + table: "sys_parm_value", + type: "character varying(50)", + maxLength: 50, + nullable: false, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldComment: "参数ID"); + + migrationBuilder.AlterColumn( + name: "parent_id", + table: "sys_parm_type", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "父ID"); + + migrationBuilder.AlterColumn( + name: "value_type", + table: "sys_parm", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "结果类别"); + + migrationBuilder.AlterColumn( + name: "sys_parm_type_id", + table: "sys_parm", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "参数类别ID"); + + migrationBuilder.AlterColumn( + name: "remark", + table: "sys_parm", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "备注"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "sys_parm", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "参数名"); + + migrationBuilder.AlterColumn( + name: "template_content", + table: "summary_template", + type: "character varying(200)", + maxLength: 200, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true, + oldComment: "模板内容"); + + migrationBuilder.AlterColumn( + name: "summary_title", + table: "sum_summary_header", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "综述标题"); + + migrationBuilder.AlterColumn( + name: "summary_flag", + table: "sum_summary_header", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "综述标志"); + + migrationBuilder.AlterColumn( + name: "patient_register_id", + table: "sum_summary_header", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "病人登记ID"); + + migrationBuilder.AlterColumn( + name: "summary_content", + table: "sum_summary_content", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "建议内容"); + + migrationBuilder.AlterColumn( + name: "sum_summary_header_id", + table: "sum_summary_content", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "建议头ID"); + + migrationBuilder.AlterColumn( + name: "suggestion_title", + table: "sum_suggestion_header", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "建议标题"); + + migrationBuilder.AlterColumn( + name: "suggestion_flag", + table: "sum_suggestion_header", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "建议标志"); + + migrationBuilder.AlterColumn( + name: "patient_register_id", + table: "sum_suggestion_header", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "病人登记ID"); + + migrationBuilder.AlterColumn( + name: "sum_suggestion_header_id", + table: "sum_suggestion_content", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "建议头ID"); + + migrationBuilder.AlterColumn( + name: "suggestion_content", + table: "sum_suggestion_content", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "建议内容"); + + migrationBuilder.AlterColumn( + name: "sum_suggestion_header_id", + table: "sum_diagnosis", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "建议头ID"); + + migrationBuilder.AlterColumn( + name: "diagnosis_id", + table: "sum_diagnosis", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "诊断ID"); + + migrationBuilder.AlterColumn( + name: "patient_register_id", + table: "sum_diagnosis", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "病人登记ID"); + + migrationBuilder.AlterColumn( + name: "suggestion_content", + table: "suggestion", + type: "character varying(200)", + maxLength: 200, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true, + oldComment: "建议内容"); + + migrationBuilder.AlterColumn( + name: "diagnosis_id", + table: "suggestion", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "诊断ID"); + + migrationBuilder.AlterColumn( + name: "sms_type_id", + table: "sms_template", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "短信类别ID"); + + migrationBuilder.AlterColumn( + name: "content", + table: "sms_template", + type: "character varying(200)", + maxLength: 200, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true, + oldComment: "短信内容"); + + migrationBuilder.AlterColumn( + name: "sms_type_id", + table: "sms_send", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "短信类别ID"); + + migrationBuilder.AlterColumn( + name: "patient_name", + table: "sms_send", + type: "character varying(16)", + maxLength: 16, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(16)", + oldMaxLength: 16, + oldNullable: true, + oldComment: "姓名"); + + migrationBuilder.AlterColumn( + name: "patient_id", + table: "sms_send", + type: "uuid", + maxLength: 10, + nullable: true, + oldClrType: typeof(Guid), + oldType: "uuid", + oldMaxLength: 10, + oldNullable: true, + oldComment: "人员ID"); + + migrationBuilder.AlterColumn( + name: "mobile_telephone", + table: "sms_send", + type: "character varying(11)", + maxLength: 11, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(11)", + oldMaxLength: 11, + oldNullable: true, + oldComment: "手机号"); + + migrationBuilder.AlterColumn( + name: "is_complete", + table: "sms_send", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是完成"); + + migrationBuilder.AlterColumn( + name: "follow_up_plan_id", + table: "sms_send", + type: "uuid", + nullable: true, + oldClrType: typeof(Guid), + oldType: "uuid", + oldNullable: true, + oldComment: "随访计划ID"); + + migrationBuilder.AlterColumn( + name: "content", + table: "sms_send", + type: "character varying(200)", + maxLength: 200, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true, + oldComment: "短信内容"); + + migrationBuilder.AlterColumn( + name: "upper_diagnosis_id", + table: "sex_hormone_reference_range", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "上限诊断"); + + migrationBuilder.AlterColumn( + name: "sex_hormone_term_id", + table: "sex_hormone_reference_range", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "性激素期限ID"); + + migrationBuilder.AlterColumn( + name: "reference_range_value", + table: "sex_hormone_reference_range", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "参考范围"); + + migrationBuilder.AlterColumn( + name: "lower_diagnosis_id", + table: "sex_hormone_reference_range", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "下限诊断"); + + migrationBuilder.AlterColumn( + name: "item_id", + table: "sex_hormone_reference_range", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "项目编号"); + + migrationBuilder.AlterColumn( + name: "critical_range_value", + table: "sex_hormone_reference_range", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "危急值参考范围"); + + migrationBuilder.AlterColumn( + name: "age_upper_limit", + table: "sex_hormone_reference_range", + type: "smallint", + nullable: false, + defaultValueSql: "200", + oldClrType: typeof(short), + oldType: "smallint", + oldDefaultValueSql: "200", + oldComment: "年龄上限"); + + migrationBuilder.AlterColumn( + name: "age_lower_limit", + table: "sex_hormone_reference_range", + type: "smallint", + nullable: false, + oldClrType: typeof(short), + oldType: "smallint", + oldComment: "年龄下限"); + + migrationBuilder.AlterColumn( + name: "is_complete", + table: "settle_account", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是完成"); + + migrationBuilder.AlterColumn( + name: "completed_time", + table: "settle_account", + type: "timestamp without time zone", + nullable: true, + oldClrType: typeof(DateTime), + oldType: "timestamp without time zone", + oldNullable: true, + oldComment: "结账时间"); + + migrationBuilder.AlterColumn( + name: "completed_by", + table: "settle_account", + type: "character varying(16)", + maxLength: 16, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(16)", + oldMaxLength: 16, + oldNullable: true, + oldComment: "结账人"); + + migrationBuilder.AlterColumn( + name: "asbitem_id", + table: "sample_group_detail", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "组合项目编号"); + + migrationBuilder.AlterColumn( + name: "sample_type_id", + table: "sample_group", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "标本类型ID"); + + migrationBuilder.AlterColumn( + name: "sample_container_id", + table: "sample_group", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "标本容器ID"); + + migrationBuilder.AlterColumn( + name: "container_color_name", + table: "sample_container", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "颜色名"); + + migrationBuilder.AlterColumn( + name: "container_color", + table: "sample_container", + type: "integer", + nullable: false, + oldClrType: typeof(int), + oldType: "integer", + oldComment: "颜色"); + + migrationBuilder.AlterColumn( + name: "item_type_id", + table: "room", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "项目类别编号"); + + migrationBuilder.AlterColumn( + name: "department_id", + table: "room", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: ""); + + migrationBuilder.AlterColumn( + name: "report_prompt", + table: "result_status", + type: "character varying(8)", + maxLength: 8, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(8)", + oldMaxLength: 8, + oldNullable: true, + oldComment: "报告单提示"); + + migrationBuilder.AlterColumn( + name: "report_font_color", + table: "result_status", + type: "integer", + nullable: false, + oldClrType: typeof(int), + oldType: "integer", + oldComment: "报告单字体颜色"); + + migrationBuilder.AlterColumn( + name: "report_background_color", + table: "result_status", + type: "integer", + nullable: false, + defaultValueSql: "16777215", + oldClrType: typeof(int), + oldType: "integer", + oldDefaultValueSql: "16777215", + oldComment: "报告单背景颜色"); + + migrationBuilder.AlterColumn( + name: "data_input_prompt", + table: "result_status", + type: "character varying(8)", + maxLength: 8, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(8)", + oldMaxLength: 8, + oldNullable: true, + oldComment: "数据录入提示"); + + migrationBuilder.AlterColumn( + name: "data_input_font_color", + table: "result_status", + type: "integer", + nullable: false, + oldClrType: typeof(int), + oldType: "integer", + oldComment: "数据录入字体颜色"); + + migrationBuilder.AlterColumn( + name: "data_input_background_color", + table: "result_status", + type: "integer", + nullable: false, + defaultValueSql: "16777215", + oldClrType: typeof(int), + oldType: "integer", + oldDefaultValueSql: "16777215", + oldComment: "数据录入报告单颜色"); + + migrationBuilder.AlterColumn( + name: "summary_flag", + table: "register_check_summary", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "综述标志"); + + migrationBuilder.AlterColumn( + name: "summary", + table: "register_check_summary", + type: "character varying(500)", + maxLength: 500, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(500)", + oldMaxLength: 500, + oldNullable: true, + oldComment: "综述"); + + migrationBuilder.AlterColumn( + name: "register_check_id", + table: "register_check_summary", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "登记检查ID"); + + migrationBuilder.AlterColumn( + name: "display_order", + table: "register_check_summary", + type: "integer", + nullable: false, + oldClrType: typeof(int), + oldType: "integer", + oldComment: "顺序"); + + migrationBuilder.AlterColumn( + name: "suggestion", + table: "register_check_suggestion", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "建议"); + + migrationBuilder.AlterColumn( + name: "register_check_id", + table: "register_check_suggestion", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "登记检查ID"); + + migrationBuilder.AlterColumn( + name: "display_order", + table: "register_check_suggestion", + type: "integer", + nullable: false, + oldClrType: typeof(int), + oldType: "integer", + oldComment: "显示顺序"); + + migrationBuilder.AlterColumn( + name: "unit", + table: "register_check_item", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "单位"); + + migrationBuilder.AlterColumn( + name: "critical_value", + table: "register_check_item", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "危急值"); + + migrationBuilder.AlterColumn( + name: "critical_range_value", + table: "register_check_item", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "危急值范围"); + + migrationBuilder.AlterColumn( + name: "item_id", + table: "register_check_item", + type: "uuid", + fixedLength: true, + nullable: false, + comment: "项目", + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "项目编号"); + + migrationBuilder.AlterColumn( + name: "register_check_id", + table: "register_check_critical_value", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "登记检查ID"); + + migrationBuilder.AlterColumn( + name: "process_type_flag", + table: "register_check_critical_value", + type: "character(1)", + maxLength: 1, + nullable: true, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldNullable: true, + oldComment: "处理类别标志"); + + migrationBuilder.AlterColumn( + name: "item_id", + table: "register_check_critical_value", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "项目编号"); + + migrationBuilder.AlterColumn( + name: "is_complete", + table: "register_check_critical_value", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是否完成"); + + migrationBuilder.AlterColumn( + name: "doctor", + table: "register_check_critical_value", + type: "character varying(16)", + maxLength: 16, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(16)", + oldMaxLength: 16, + oldNullable: true, + oldComment: "处理医生"); + + migrationBuilder.AlterColumn( + name: "critical_value", + table: "register_check_critical_value", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "危急值"); + + migrationBuilder.AlterColumn( + name: "third_info", + table: "register_check", + type: "character varying(80)", + maxLength: 80, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(80)", + oldMaxLength: 80, + oldNullable: true, + oldComment: "第三方信息"); + + migrationBuilder.AlterColumn( + name: "is_lock", + table: "register_check", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是否锁住"); + + migrationBuilder.AlterColumn( + name: "is_audit", + table: "register_check", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是审核"); + + migrationBuilder.AlterColumn( + name: "critical_value_process_flag", + table: "register_check", + type: "character(1)", + maxLength: 1, + nullable: true, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldNullable: true, + oldComment: "危急值处理标志"); + + migrationBuilder.AlterColumn( + name: "critical_value_process_doctor", + table: "register_check", + type: "character varying(16)", + maxLength: 16, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(16)", + oldMaxLength: 16, + oldNullable: true, + oldComment: "危急值处理医生"); + + migrationBuilder.AlterColumn( + name: "critical_value_process_date", + table: "register_check", + type: "date", + nullable: true, + oldClrType: typeof(DateOnly), + oldType: "date", + oldNullable: true, + oldComment: "危急值处理日期"); + + migrationBuilder.AlterColumn( + name: "critical_value_process_content", + table: "register_check", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "危急值处理内容"); + + migrationBuilder.AlterColumn( + name: "critical_value_flag", + table: "register_check", + type: "character(1)", + maxLength: 1, + nullable: true, + defaultValueSql: "0", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldNullable: true, + oldDefaultValueSql: "0", + oldComment: "危急值标志"); + + migrationBuilder.AlterColumn( + name: "critical_value_create_date", + table: "register_check", + type: "date", + nullable: true, + oldClrType: typeof(DateOnly), + oldType: "date", + oldNullable: true, + oldComment: "危急值创建日期"); + + migrationBuilder.AlterColumn( + name: "critical_value", + table: "register_check", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "危急值"); + + migrationBuilder.AlterColumn( + name: "complete_flag", + table: "register_check", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "0", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "0", + oldComment: "完成标志"); + + migrationBuilder.AlterColumn( + name: "check_request_print_times", + table: "register_check", + type: "smallint", + nullable: false, + oldClrType: typeof(short), + oldType: "smallint", + oldComment: "检查申请单打印次数"); + + migrationBuilder.AlterColumn( + name: "check_request_no", + table: "register_check", + type: "uuid", + maxLength: 20, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldMaxLength: 20, + oldComment: "检查单号"); + + migrationBuilder.AlterColumn( + name: "check_doctor_id", + table: "register_check", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "检查医生ID"); + + migrationBuilder.AlterColumn( + name: "check_date", + table: "register_check", + type: "date", + nullable: true, + oldClrType: typeof(DateOnly), + oldType: "date", + oldNullable: true, + oldComment: "检查日期"); + + migrationBuilder.AlterColumn( + name: "auditor_user_id", + table: "register_check", + type: "uuid", + nullable: true, + oldClrType: typeof(Guid), + oldType: "uuid", + oldNullable: true, + oldComment: "审核医生ID"); + + migrationBuilder.AlterColumn( + name: "audit_time", + table: "register_check", + type: "timestamp without time zone", + nullable: true, + oldClrType: typeof(DateTime), + oldType: "timestamp without time zone", + oldNullable: true, + oldComment: "审核时间"); + + migrationBuilder.AlterColumn( + name: "register_asbitem_id", + table: "register_asbitem", + type: "uuid", + nullable: true, + oldClrType: typeof(Guid), + oldType: "uuid", + oldNullable: true, + oldComment: "主键"); + + migrationBuilder.AlterColumn( + name: "lis_request_id", + table: "register_asbitem", + type: "uuid", + maxLength: 20, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldMaxLength: 20, + oldComment: "LIS申请ID"); + + migrationBuilder.AlterColumn( + name: "amount", + table: "register_asbitem", + type: "smallint", + nullable: true, + oldClrType: typeof(short), + oldType: "smallint", + oldNullable: true, + oldComment: "数量"); + + migrationBuilder.AlterColumn( + name: "register_check_id", + table: "register_asbitem", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "检查单ID"); + + migrationBuilder.AlterColumn( + name: "reference_range_type_flag", + table: "reference_range", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "参考范围类别0-无参考范围,1-数字型,2-字符型,3-性激素"); + + migrationBuilder.AlterColumn( + name: "room_id", + table: "queue_register", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "房间ID"); + + migrationBuilder.AlterColumn( + name: "patient_register_id", + table: "queue_register", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "病人登记ID"); + + migrationBuilder.AlterColumn( + name: "no_complete_reason", + table: "queue_register", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "0", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "0", + oldComment: "未完成原因"); + + migrationBuilder.AlterColumn( + name: "display_order", + table: "queue_register", + type: "integer", + nullable: false, + oldClrType: typeof(int), + oldType: "integer", + oldComment: "排队顺序"); + + migrationBuilder.AlterColumn( + name: "complete_flag", + table: "queue_register", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "0", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "0", + oldComment: "完成标志"); + + migrationBuilder.AlterColumn( + name: "call_time", + table: "queue_register", + type: "timestamp without time zone", + nullable: true, + oldClrType: typeof(DateTime), + oldType: "timestamp without time zone", + oldNullable: true, + oldComment: "叫号时间"); + + migrationBuilder.AlterColumn( + name: "price_item_code", + table: "price_item", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "价表编码"); + + migrationBuilder.AlterColumn( + name: "price", + table: "price_item", + type: "numeric(10,2)", + precision: 10, + scale: 2, + nullable: false, + oldClrType: typeof(decimal), + oldType: "numeric(10,2)", + oldPrecision: 10, + oldScale: 2, + oldComment: "价格"); + + migrationBuilder.AlterColumn( + name: "invoice_item_type_id", + table: "price_item", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "发票项目类别ID"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "price_item", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "reply_content", + table: "phone_follow", + type: "character varying(200)", + maxLength: 200, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true, + oldComment: "回复内容"); + + migrationBuilder.AlterColumn( + name: "patient_register_id", + table: "phone_follow", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "病人登记ID"); + + migrationBuilder.AlterColumn( + name: "follow_up_plan_id", + table: "phone_follow", + type: "uuid", + nullable: true, + oldClrType: typeof(Guid), + oldType: "uuid", + oldNullable: true, + oldComment: "随访计划ID"); + + migrationBuilder.AlterColumn( + name: "follow_content", + table: "phone_follow", + type: "character varying(200)", + maxLength: 200, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true, + oldComment: "随访内容"); + + migrationBuilder.AlterColumn( + name: "id", + table: "pay_mode", + type: "character(4)", + fixedLength: true, + maxLength: 4, + nullable: false, + oldClrType: typeof(string), + oldType: "character(4)", + oldFixedLength: true, + oldMaxLength: 4, + oldComment: "编号,固定编码"); + + migrationBuilder.AlterColumn( + name: "third_info", + table: "patient_register", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "附加第三方信息"); + + migrationBuilder.AlterColumn( + name: "sex_hormone_term_id", + table: "patient_register", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "性激素期限"); + + migrationBuilder.AlterColumn( + name: "remark", + table: "patient_register", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "备注"); + + migrationBuilder.AlterColumn( + name: "organization_unit_id", + table: "patient_register", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "体检中心ID"); + + migrationBuilder.AlterColumn( + name: "medical_card_no", + table: "patient_register", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "体检卡号"); + + migrationBuilder.AlterColumn( + name: "is_vip", + table: "patient_register", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "vip客户"); + + migrationBuilder.AlterColumn( + name: "is_upload", + table: "patient_register", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是否上传到WEB"); + + migrationBuilder.AlterColumn( + name: "is_recover_guide", + table: "patient_register", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "指引单收回"); + + migrationBuilder.AlterColumn( + name: "is_phone_follow", + table: "patient_register", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "电话随访"); + + migrationBuilder.AlterColumn( + name: "is_name_hide", + table: "patient_register", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "隐藏姓名"); + + migrationBuilder.AlterColumn( + name: "is_lock", + table: "patient_register", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "锁住"); + + migrationBuilder.AlterColumn( + name: "is_audit", + table: "patient_register", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "审核"); + + migrationBuilder.AlterColumn( + name: "guide_print_times", + table: "patient_register", + type: "smallint", + nullable: false, + oldClrType: typeof(short), + oldType: "smallint", + oldComment: "指引单打印次数"); + + migrationBuilder.AlterColumn( + name: "customer_org_register_id", + table: "patient_register", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "客户单位登记ID"); + + migrationBuilder.AlterColumn( + name: "birth_date", + table: "patient_register", + type: "date", + nullable: true, + oldClrType: typeof(DateOnly), + oldType: "date", + oldNullable: true, + oldComment: "出生日期"); + + migrationBuilder.AlterColumn( + name: "audit_doctor", + table: "patient_register", + type: "character varying(16)", + maxLength: 16, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(16)", + oldMaxLength: 16, + oldNullable: true, + oldComment: "审核医生"); + + migrationBuilder.AlterColumn( + name: "audit_date", + table: "patient_register", + type: "date", + nullable: true, + oldClrType: typeof(DateOnly), + oldType: "date", + oldNullable: true, + oldComment: "审核日期"); + + migrationBuilder.AlterColumn( + name: "telephone", + table: "patient", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "电话"); + + migrationBuilder.AlterColumn( + name: "sex_id", + table: "patient", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "性别"); + + migrationBuilder.AlterColumn( + name: "postal_code", + table: "patient", + type: "character varying(10)", + maxLength: 10, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(10)", + oldMaxLength: 10, + oldNullable: true, + oldComment: "邮政编码"); + + migrationBuilder.AlterColumn( + name: "patient_password", + table: "patient", + type: "character varying(10)", + maxLength: 10, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(10)", + oldMaxLength: 10, + oldNullable: true, + oldComment: "登录密码"); + + migrationBuilder.AlterColumn( + name: "nation_id", + table: "patient", + type: "uuid", + fixedLength: true, + nullable: true, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldNullable: true, + oldComment: "民族编号"); + + migrationBuilder.AlterColumn( + name: "mobile_telephone", + table: "patient", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "手机号"); + + migrationBuilder.AlterColumn( + name: "marital_status_id", + table: "patient", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "婚姻状况"); + + migrationBuilder.AlterColumn( + name: "id_no", + table: "patient", + type: "character varying(18)", + maxLength: 18, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(18)", + oldMaxLength: 18, + oldNullable: true, + oldComment: "身份证号"); + + migrationBuilder.AlterColumn( + name: "email", + table: "patient", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "email"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "patient", + type: "character varying(30)", + maxLength: 30, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(30)", + oldMaxLength: 30, + oldNullable: true, + oldComment: "姓名"); + + migrationBuilder.AlterColumn( + name: "birth_place_id", + table: "patient", + type: "uuid", + fixedLength: true, + nullable: true, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldNullable: true, + oldComment: "出生地"); + + migrationBuilder.AlterColumn( + name: "birth_date", + table: "patient", + type: "date", + nullable: true, + oldClrType: typeof(DateOnly), + oldType: "date", + oldNullable: true, + oldComment: "出生日期"); + + migrationBuilder.AlterColumn( + name: "address", + table: "patient", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "地址"); + + migrationBuilder.AlterColumn( + name: "organization_unit_id", + table: "organization_units_customer_org", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "体检中心编号"); + + migrationBuilder.AlterColumn( + name: "customer_org_id", + table: "organization_units_customer_org", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "客户单位编号"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "medical_report_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "asbitem_id", + table: "medical_package_detail", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "组合项目编号"); + + migrationBuilder.AlterColumn( + name: "sign_in_time", + table: "lis_request", + type: "date", + nullable: true, + oldClrType: typeof(DateOnly), + oldType: "date", + oldNullable: true, + oldComment: "签收时间"); + + migrationBuilder.AlterColumn( + name: "sign_in_person", + table: "lis_request", + type: "character varying(16)", + maxLength: 16, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(16)", + oldMaxLength: 16, + oldNullable: true, + oldComment: "签收人姓名"); + + migrationBuilder.AlterColumn( + name: "sign_in_order", + table: "lis_request", + type: "integer", + nullable: true, + oldClrType: typeof(int), + oldType: "integer", + oldNullable: true, + oldComment: "签收顺序"); + + migrationBuilder.AlterColumn( + name: "sampling_time", + table: "lis_request", + type: "date", + nullable: true, + oldClrType: typeof(DateOnly), + oldType: "date", + oldNullable: true, + oldComment: "采样时间"); + + migrationBuilder.AlterColumn( + name: "sampler", + table: "lis_request", + type: "character varying(16)", + maxLength: 16, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(16)", + oldMaxLength: 16, + oldNullable: true, + oldComment: "采样人姓名"); + + migrationBuilder.AlterColumn( + name: "sample_type_id", + table: "lis_request", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "标本类型"); + + migrationBuilder.AlterColumn( + name: "sample_container_id", + table: "lis_request", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "标本容器编号"); + + migrationBuilder.AlterColumn( + name: "patient_register_id", + table: "lis_request", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "病人登记ID"); + + migrationBuilder.AlterColumn( + name: "lis_request_no", + table: "lis_request", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "检验申请单号"); + + migrationBuilder.AlterColumn( + name: "is_sign_in", + table: "lis_request", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是签收"); + + migrationBuilder.AlterColumn( + name: "is_print", + table: "lis_request", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是否已打印"); + + migrationBuilder.AlterColumn( + name: "simple_code", + table: "item_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "自定义简码"); + + migrationBuilder.AlterColumn( + name: "path_code", + table: "item_type", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "路径编码"); + + migrationBuilder.AlterColumn( + name: "parent_id", + table: "item_type", + type: "uuid", + fixedLength: true, + nullable: true, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldNullable: true, + oldComment: "父id"); + + migrationBuilder.AlterColumn( + name: "medical_report_type_id", + table: "item_type", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "体检报告类别"); + + migrationBuilder.AlterColumn( + name: "is_merge_asbitem", + table: "item_type", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "合并组合项目,Y-是,N-否"); + + migrationBuilder.AlterColumn( + name: "guid_type_id", + table: "item_type", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "指引类别"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "item_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "check_type_flag", + table: "item_type", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "'G'::bpchar", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "'G'::bpchar", + oldComment: "检查类别,0-普通检查,1-检验,2-影像检查"); + + migrationBuilder.AlterColumn( + name: "item_id", + table: "item_template_detail", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "项目编号"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "item_default_result", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "unit_id", + table: "item", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "单位"); + + migrationBuilder.AlterColumn( + name: "result_template_type_flag", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "0", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "0", + oldComment: "结果模板类别标志"); + + migrationBuilder.AlterColumn( + name: "reference_range_type_flag", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "'E'::bpchar", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "'E'::bpchar", + oldComment: "参考范围类别0-无参考范围,1-数字型,2-字符型,3-性激素"); + + migrationBuilder.AlterColumn( + name: "price_item_id", + table: "item", + type: "uuid", + fixedLength: true, + maxLength: 8, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldMaxLength: 8, + oldComment: "价表项目编码"); + + migrationBuilder.AlterColumn( + name: "price", + table: "item", + type: "numeric(10,2)", + precision: 10, + scale: 2, + nullable: false, + oldClrType: typeof(decimal), + oldType: "numeric(10,2)", + oldPrecision: 10, + oldScale: 2, + oldComment: "价格"); + + migrationBuilder.AlterColumn( + name: "item_type_id", + table: "item", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "项目类别"); + + migrationBuilder.AlterColumn( + name: "is_produce_summary", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是生成小结"); + + migrationBuilder.AlterColumn( + name: "is_name_into_summary", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "名称进入小结"); + + migrationBuilder.AlterColumn( + name: "is_diagnosis_function", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "启用诊断函数"); + + migrationBuilder.AlterColumn( + name: "is_continue_process", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是继续处理"); + + migrationBuilder.AlterColumn( + name: "is_calculation_item", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是计算项目"); + + migrationBuilder.AlterColumn( + name: "is_active", + table: "item", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "启用"); + + migrationBuilder.AlterColumn( + name: "input_check", + table: "item", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "输入结果校验公式"); + + migrationBuilder.AlterColumn( + name: "english_short_name", + table: "item", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "英文缩写"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "item", + type: "character varying(30)", + maxLength: 30, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(30)", + oldMaxLength: 30, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "diagnosis_function", + table: "item", + type: "character varying(2000)", + maxLength: 2000, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(2000)", + oldMaxLength: 2000, + oldNullable: true, + oldComment: "诊断函数"); + + migrationBuilder.AlterColumn( + name: "default_result", + table: "item", + type: "character varying(200)", + maxLength: 200, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true, + oldComment: "默认结果"); + + migrationBuilder.AlterColumn( + name: "calculation_function", + table: "item", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "计算函数"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "invoice_org", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "invoice_item_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "guide_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "follow_up_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "remark", + table: "follow_up_plan", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "备注"); + + migrationBuilder.AlterColumn( + name: "perfom_user_id", + table: "follow_up_plan", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "执行者用户ID"); + + migrationBuilder.AlterColumn( + name: "perfom_time", + table: "follow_up_plan", + type: "timestamp without time zone", + nullable: true, + oldClrType: typeof(DateTime), + oldType: "timestamp without time zone", + oldNullable: true, + oldComment: "执行时间"); + + migrationBuilder.AlterColumn( + name: "perfom_flag", + table: "follow_up_plan", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "执行标志"); + + migrationBuilder.AlterColumn( + name: "is_loop", + table: "follow_up_plan", + type: "character(1)", + maxLength: 1, + nullable: true, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldNullable: true, + oldComment: "是否循环"); + + migrationBuilder.AlterColumn( + name: "follow_up_type_id", + table: "follow_up_plan", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "随访类别"); + + migrationBuilder.AlterColumn( + name: "follow_up_mode_id", + table: "follow_up_plan", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "随访方式"); + + migrationBuilder.AlterColumn( + name: "doctor_user_id", + table: "follow_up_plan", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "医生"); + + migrationBuilder.AlterColumn( + name: "cycle_days", + table: "follow_up_plan", + type: "smallint", + nullable: false, + oldClrType: typeof(short), + oldType: "smallint", + oldComment: "周期天数"); + + migrationBuilder.AlterColumn( + name: "content", + table: "follow_up_plan", + type: "character varying(200)", + maxLength: 200, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true, + oldComment: "随访内容"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "follow_up_mode", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "path_code", + table: "diagnosis_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "路径编码"); + + migrationBuilder.AlterColumn( + name: "parent_id", + table: "diagnosis_type", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "父编号"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "diagnosis_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "diagnosis_id", + table: "diagnosis_template_detail", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "诊断编号"); + + migrationBuilder.AlterColumn( + name: "diagnosis_template_id", + table: "diagnosis_template_detail", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "诊断模板编号"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "diagnosis_template", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "diagnosis_postfix", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "suggestion_name", + table: "diagnosis", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "建议名称"); + + migrationBuilder.AlterColumn( + name: "item_type_id", + table: "diagnosis", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "项目类别"); + + migrationBuilder.AlterColumn( + name: "is_summary_template", + table: "diagnosis", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是总检模板"); + + migrationBuilder.AlterColumn( + name: "is_ill", + table: "diagnosis", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是疾病"); + + migrationBuilder.AlterColumn( + name: "for_sex_id", + table: "diagnosis", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "'A'::bpchar", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "'A'::bpchar", + oldComment: "适用性别"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "diagnosis", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "diagnosis_level_id", + table: "diagnosis", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "诊断级别"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "customer_org_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "register_no", + table: "customer_org_register", + type: "character varying(12)", + maxLength: 12, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(12)", + oldMaxLength: 12, + oldNullable: true, + oldComment: "计划号"); + + migrationBuilder.AlterColumn( + name: "register_name", + table: "customer_org_register", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "计划名称"); + + migrationBuilder.AlterColumn( + name: "price", + table: "customer_org_group_detail", + type: "numeric(10,2)", + precision: 10, + scale: 2, + nullable: false, + oldClrType: typeof(decimal), + oldType: "numeric(10,2)", + oldPrecision: 10, + oldScale: 2, + oldComment: "价格"); + + migrationBuilder.AlterColumn( + name: "asbitem_id", + table: "customer_org_group_detail", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "组合项目编号"); + + migrationBuilder.AlterColumn( + name: "customer_org_group_id", + table: "customer_org_group_detail", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "分组编号"); + + migrationBuilder.AlterColumn( + name: "pay_mode_id", + table: "customer_org_charge_pay", + type: "character(4)", + fixedLength: true, + maxLength: 4, + nullable: true, + oldClrType: typeof(string), + oldType: "character(4)", + oldFixedLength: true, + oldMaxLength: 4, + oldNullable: true, + oldComment: "支付方式"); + + migrationBuilder.AlterColumn( + name: "charge_money", + table: "customer_org_charge_pay", + type: "numeric(10,2)", + precision: 10, + scale: 2, + nullable: false, + oldClrType: typeof(decimal), + oldType: "numeric(10,2)", + oldPrecision: 10, + oldScale: 2, + oldComment: "支付金额"); + + migrationBuilder.AlterColumn( + name: "back_moeny", + table: "customer_org_charge_back_pay", + type: "numeric(10,2)", + precision: 10, + scale: 2, + nullable: false, + oldClrType: typeof(decimal), + oldType: "numeric(10,2)", + oldPrecision: 10, + oldScale: 2, + oldComment: "退费金额"); + + migrationBuilder.AlterColumn( + name: "pay_mode_id", + table: "customer_org_charge_back_pay", + type: "character(4)", + fixedLength: true, + maxLength: 4, + nullable: false, + oldClrType: typeof(string), + oldType: "character(4)", + oldFixedLength: true, + oldMaxLength: 4, + oldComment: "支付方式"); + + migrationBuilder.AlterColumn( + name: "settle_account_id", + table: "customer_org_charge_back", + type: "uuid", + nullable: true, + oldClrType: typeof(Guid), + oldType: "uuid", + oldNullable: true, + oldComment: "结算账户ID"); + + migrationBuilder.AlterColumn( + name: "customer_org_charge_id", + table: "customer_org_charge_back", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "收费编号"); + + migrationBuilder.AlterColumn( + name: "settle_account_id", + table: "customer_org_charge", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "结算账户ID"); + + migrationBuilder.AlterColumn( + name: "payer", + table: "customer_org_charge", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "付款人"); + + migrationBuilder.AlterColumn( + name: "customer_org_register_id", + table: "customer_org_charge", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "客户单位登记ID"); + + migrationBuilder.AlterColumn( + name: "charge_flag", + table: "customer_org_charge", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "收退费标志"); + + migrationBuilder.AlterColumn( + name: "status_flag", + table: "customer_org", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "0", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "0", + oldComment: "状态"); + + migrationBuilder.AlterColumn( + name: "short_name", + table: "customer_org", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "简称"); + + migrationBuilder.AlterColumn( + name: "path_code", + table: "customer_org", + type: "character varying(60)", + maxLength: 60, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(60)", + oldMaxLength: 60, + oldNullable: true, + oldComment: "路径编码"); + + migrationBuilder.AlterColumn( + name: "parent_id", + table: "customer_org", + type: "uuid", + fixedLength: true, + nullable: true, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldNullable: true, + oldComment: "父编号"); + + migrationBuilder.AlterColumn( + name: "is_lock", + table: "customer_org", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "锁住"); + + migrationBuilder.AlterColumn( + name: "invoice_name", + table: "customer_org", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "开票名称"); + + migrationBuilder.AlterColumn( + name: "path_code", + table: "critical_value_type", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "路径编码"); + + migrationBuilder.AlterColumn( + name: "parent_id", + table: "critical_value_type", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "父编号"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "critical_value_type", + type: "character varying(40)", + maxLength: 40, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(40)", + oldMaxLength: 40, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "critical_value", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "critical_value_type_id", + table: "critical_value", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "危急值类别编号"); + + migrationBuilder.AlterColumn( + name: "title", + table: "contact_person", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "职务"); + + migrationBuilder.AlterColumn( + name: "remark", + table: "contact_person", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "备注"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "contact_person", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "姓名"); + + migrationBuilder.AlterColumn( + name: "customer_org_id", + table: "contact_person", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "客户单位编号"); + + migrationBuilder.AlterColumn( + name: "contact_method_value", + table: "contact_method", + type: "character varying(15)", + maxLength: 15, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(15)", + oldMaxLength: 15, + oldNullable: true, + oldComment: "联系方式,比如18911254911,839860190@qq.com"); + + migrationBuilder.AlterColumn( + name: "contact_method_type", + table: "contact_method", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "'M'::bpchar", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "'M'::bpchar", + oldComment: "联系方式类别-比如0-手机、1-电子邮箱"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "common_char_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "common_char", + type: "character varying(1)", + maxLength: 1, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(1)", + oldMaxLength: 1, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "common_char_type_id", + table: "common_char", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "常用字符类别编号"); + + migrationBuilder.AlterColumn( + name: "back_moeny", + table: "charge_back_pay", + type: "numeric(10,2)", + precision: 10, + scale: 2, + nullable: false, + oldClrType: typeof(decimal), + oldType: "numeric(10,2)", + oldPrecision: 10, + oldScale: 2, + oldComment: "退费金额"); + + migrationBuilder.AlterColumn( + name: "pay_mode_id", + table: "charge_back_pay", + type: "character(4)", + fixedLength: true, + maxLength: 4, + nullable: false, + oldClrType: typeof(string), + oldType: "character(4)", + oldFixedLength: true, + oldMaxLength: 4, + oldComment: "支付方式ID"); + + migrationBuilder.AlterColumn( + name: "settle_account_id", + table: "charge_back", + type: "uuid", + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldComment: "结账ID"); + + migrationBuilder.AlterColumn( + name: "country_code", + table: "birth_place", + type: "character varying(6)", + maxLength: 6, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(6)", + oldMaxLength: 6, + oldNullable: true, + oldComment: "国家标准码"); + + migrationBuilder.AlterColumn( + name: "path_code", + table: "bigtext_result_type", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "路径编码"); + + migrationBuilder.AlterColumn( + name: "parent_id", + table: "bigtext_result_type", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "父编号"); + + migrationBuilder.AlterColumn( + name: "item_type_id", + table: "bigtext_result_type", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "项目类别"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "bigtext_result_type", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "bigtext_result_template", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "bigtext_result_type_id", + table: "bigtext_result_template", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "结果类别编号"); + + migrationBuilder.AlterColumn( + name: "description", + table: "bigtext_result_description", + type: "character varying(200)", + maxLength: 200, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true, + oldComment: "描述"); + + migrationBuilder.AlterColumn( + name: "conclusion", + table: "bigtext_result_conclusion", + type: "character varying(200)", + maxLength: 200, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(200)", + oldMaxLength: 200, + oldNullable: true, + oldComment: "结论"); + + migrationBuilder.AlterColumn( + name: "price_item_id", + table: "asbitem_price_item", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "价表项目编码"); + + migrationBuilder.AlterColumn( + name: "asbitem_id", + table: "asbitem_price_item", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "组合项目编号"); + + migrationBuilder.AlterColumn( + name: "amount", + table: "asbitem_price_item", + type: "smallint", + nullable: true, + oldClrType: typeof(short), + oldType: "smallint", + oldNullable: true, + oldComment: "数量"); + + migrationBuilder.AlterColumn( + name: "guide", + table: "asbitem_guide", + type: "character varying(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldNullable: true, + oldComment: "指引单内容"); + + migrationBuilder.AlterColumn( + name: "for_sex_id", + table: "asbitem_guide", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "适用性别ID"); + + migrationBuilder.AlterColumn( + name: "asbitem_id", + table: "asbitem_guide", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "组合项目ID"); + + migrationBuilder.AlterColumn( + name: "organization_unit_id", + table: "asbitem_guide", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "单位科室ID"); + + migrationBuilder.AlterColumn( + name: "item_id", + table: "asbitem_detail", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "项目编码"); + + migrationBuilder.AlterColumn( + name: "short_name", + table: "asbitem", + type: "character varying(20)", + maxLength: 20, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldNullable: true, + oldComment: "简称"); + + migrationBuilder.AlterColumn( + name: "queue_time", + table: "asbitem", + type: "numeric(3,1)", + precision: 3, + scale: 1, + nullable: false, + oldClrType: typeof(decimal), + oldType: "numeric(3,1)", + oldPrecision: 3, + oldScale: 1, + oldComment: "候诊时间"); + + migrationBuilder.AlterColumn( + name: "price", + table: "asbitem", + type: "numeric(8,2)", + precision: 8, + scale: 2, + nullable: false, + oldClrType: typeof(decimal), + oldType: "numeric(8,2)", + oldPrecision: 8, + oldScale: 2, + oldComment: "价格"); + + migrationBuilder.AlterColumn( + name: "item_type_id", + table: "asbitem", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "项目类别"); + + migrationBuilder.AlterColumn( + name: "is_picture_rotate", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "体检报告图片旋转90°"); + + migrationBuilder.AlterColumn( + name: "is_item_result_merger", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "项目结果合并"); + + migrationBuilder.AlterColumn( + name: "is_diagnosis_function", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "启用诊断函数"); + + migrationBuilder.AlterColumn( + name: "is_continue_process", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "诊断函数处理完毕后继续处理"); + + migrationBuilder.AlterColumn( + name: "is_check", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是检查项目"); + + migrationBuilder.AlterColumn( + name: "is_before_eat", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "餐前项目"); + + migrationBuilder.AlterColumn( + name: "is_active", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldComment: "是启用"); + + migrationBuilder.AlterColumn( + name: "invoice_item_type_id", + table: "asbitem", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "发票类别"); + + migrationBuilder.AlterColumn( + name: "for_sex_id", + table: "asbitem", + type: "character(1)", + maxLength: 1, + nullable: false, + defaultValueSql: "'A'::bpchar", + oldClrType: typeof(char), + oldType: "character(1)", + oldMaxLength: 1, + oldDefaultValueSql: "'A'::bpchar", + oldComment: "适用性别,M-男,F-女,A-全部"); + + migrationBuilder.AlterColumn( + name: "display_name", + table: "asbitem", + type: "character varying(30)", + maxLength: 30, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(30)", + oldMaxLength: 30, + oldNullable: true, + oldComment: "名称"); + + migrationBuilder.AlterColumn( + name: "diagnosis_function", + table: "asbitem", + type: "character varying(1000)", + maxLength: 1000, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(1000)", + oldMaxLength: 1000, + oldNullable: true, + oldComment: "诊断函数"); + + migrationBuilder.AlterColumn( + name: "device_type_id", + table: "asbitem", + type: "uuid", + fixedLength: true, + nullable: false, + oldClrType: typeof(Guid), + oldType: "uuid", + oldFixedLength: true, + oldComment: "仪器类别"); + + migrationBuilder.AlterColumn( + name: "default_result", + table: "asbitem", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "默认结果"); + + migrationBuilder.AlterColumn( + name: "clinical_meaning", + table: "asbitem", + type: "character varying(100)", + maxLength: 100, + nullable: true, + oldClrType: typeof(string), + oldType: "character varying(100)", + oldMaxLength: 100, + oldNullable: true, + oldComment: "临床意义"); + } + } +} diff --git a/src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs b/src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs index 83cc6662..64bc31b1 100644 --- a/src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs +++ b/src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs @@ -101,7 +101,6 @@ namespace Shentun.Peis.Migrations modelBuilder.Entity("Shentun.Peis.Books.HelloA", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("ADesc") @@ -150,7 +149,6 @@ namespace Shentun.Peis.Migrations modelBuilder.Entity("Shentun.Peis.Books.HelloType", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreationTime") @@ -284,7 +282,8 @@ namespace Shentun.Peis.Migrations b.Property("ClinicalMeaning") .HasMaxLength(100) .HasColumnType("character varying(100)") - .HasColumnName("clinical_meaning"); + .HasColumnName("clinical_meaning") + .HasComment("临床意义"); b.Property("CreationTime") .ValueGeneratedOnAdd() @@ -299,22 +298,26 @@ namespace Shentun.Peis.Migrations b.Property("DefaultResult") .HasMaxLength(100) .HasColumnType("character varying(100)") - .HasColumnName("default_result"); + .HasColumnName("default_result") + .HasComment("默认结果"); b.Property("DeviceTypeId") .HasColumnType("uuid") .HasColumnName("device_type_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("仪器类别"); b.Property("DiagnosisFunction") .HasMaxLength(1000) .HasColumnType("character varying(1000)") - .HasColumnName("diagnosis_function"); + .HasColumnName("diagnosis_function") + .HasComment("诊断函数"); b.Property("DisplayName") .HasMaxLength(30) .HasColumnType("character varying(30)") - .HasColumnName("display_name"); + .HasColumnName("display_name") + .HasComment("名称"); b.Property("DisplayOrder") .HasColumnType("integer") @@ -325,52 +328,62 @@ namespace Shentun.Peis.Migrations .HasMaxLength(1) .HasColumnType("character(1)") .HasColumnName("for_sex_id") - .HasDefaultValueSql("'A'::bpchar"); + .HasDefaultValueSql("'A'::bpchar") + .HasComment("适用性别,M-男,F-女,A-全部"); b.Property("InvoiceItemTypeId") .HasColumnType("uuid") .HasColumnName("invoice_item_type_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("发票类别"); b.Property("IsActive") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("is_active"); + .HasColumnName("is_active") + .HasComment("是启用"); b.Property("IsBeforeEat") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("is_before_eat"); + .HasColumnName("is_before_eat") + .HasComment("餐前项目"); b.Property("IsCheck") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("is_check"); + .HasColumnName("is_check") + .HasComment("是检查项目"); b.Property("IsContinueProcess") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("is_continue_process"); + .HasColumnName("is_continue_process") + .HasComment("诊断函数处理完毕后继续处理"); b.Property("IsDiagnosisFunction") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("is_diagnosis_function"); + .HasColumnName("is_diagnosis_function") + .HasComment("启用诊断函数"); b.Property("IsItemResultMerger") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("is_item_result_merger"); + .HasColumnName("is_item_result_merger") + .HasComment("项目结果合并"); b.Property("IsPictureRotate") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("is_picture_rotate"); + .HasColumnName("is_picture_rotate") + .HasComment("体检报告图片旋转90°"); b.Property("ItemTypeId") .HasColumnType("uuid") .HasColumnName("item_type_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("项目类别"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") @@ -383,17 +396,20 @@ namespace Shentun.Peis.Migrations b.Property("Price") .HasPrecision(8, 2) .HasColumnType("numeric(8,2)") - .HasColumnName("price"); + .HasColumnName("price") + .HasComment("价格"); b.Property("QueueTime") .HasPrecision(3, 1) .HasColumnType("numeric(3,1)") - .HasColumnName("queue_time"); + .HasColumnName("queue_time") + .HasComment("候诊时间"); b.Property("ShortName") .HasMaxLength(20) .HasColumnType("character varying(20)") - .HasColumnName("short_name"); + .HasColumnName("short_name") + .HasComment("简称"); b.Property("SimpleCode") .HasMaxLength(30) @@ -424,7 +440,8 @@ namespace Shentun.Peis.Migrations b.Property("ItemId") .HasColumnType("uuid") .HasColumnName("item_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("项目编码"); b.HasKey("AsbitemId", "ItemId") .HasName("pk_department_asbitem_detail"); @@ -441,22 +458,26 @@ namespace Shentun.Peis.Migrations b.Property("OrganizationUnitId") .HasColumnType("uuid") .HasColumnName("organization_unit_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("单位科室ID"); b.Property("AsbitemId") .HasColumnType("uuid") .HasColumnName("asbitem_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("组合项目ID"); b.Property("ForSexId") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("for_sex_id"); + .HasColumnName("for_sex_id") + .HasComment("适用性别ID"); b.Property("Guide") .HasMaxLength(50) .HasColumnType("character varying(50)") - .HasColumnName("guide"); + .HasColumnName("guide") + .HasComment("指引单内容"); b.HasKey("OrganizationUnitId", "AsbitemId", "ForSexId") .HasName("pk_department_asbitem_guide"); @@ -474,12 +495,14 @@ namespace Shentun.Peis.Migrations b.Property("Amount") .HasColumnType("smallint") - .HasColumnName("amount"); + .HasColumnName("amount") + .HasComment("数量"); b.Property("AsbitemId") .HasColumnType("uuid") .HasColumnName("asbitem_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("组合项目编号"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") @@ -500,7 +523,8 @@ namespace Shentun.Peis.Migrations b.Property("PriceItemId") .HasColumnType("uuid") .HasColumnName("price_item_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("价表项目编码"); b.HasKey("Id"); @@ -523,7 +547,8 @@ namespace Shentun.Peis.Migrations b.Property("Conclusion") .HasMaxLength(200) .HasColumnType("character varying(200)") - .HasColumnName("conclusion"); + .HasColumnName("conclusion") + .HasComment("结论"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") @@ -578,7 +603,8 @@ namespace Shentun.Peis.Migrations b.Property("Description") .HasMaxLength(200) .HasColumnType("character varying(200)") - .HasColumnName("description"); + .HasColumnName("description") + .HasComment("描述"); b.Property("DisplayOrder") .ValueGeneratedOnAdd() @@ -612,7 +638,8 @@ namespace Shentun.Peis.Migrations b.Property("BigtextResultTypeId") .HasColumnType("uuid") .HasColumnName("bigtext_result_type_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("结果类别编号"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") @@ -625,7 +652,8 @@ namespace Shentun.Peis.Migrations b.Property("DisplayName") .HasMaxLength(50) .HasColumnType("character varying(50)") - .HasColumnName("display_name"); + .HasColumnName("display_name") + .HasComment("名称"); b.Property("DisplayOrder") .HasColumnType("integer") @@ -670,7 +698,8 @@ namespace Shentun.Peis.Migrations b.Property("DisplayName") .HasMaxLength(20) .HasColumnType("character varying(20)") - .HasColumnName("display_name"); + .HasColumnName("display_name") + .HasComment("名称"); b.Property("DisplayOrder") .HasColumnType("integer") @@ -679,7 +708,8 @@ namespace Shentun.Peis.Migrations b.Property("ItemTypeId") .HasColumnType("uuid") .HasColumnName("item_type_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("项目类别"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") @@ -692,12 +722,14 @@ namespace Shentun.Peis.Migrations b.Property("ParentId") .HasColumnType("uuid") .HasColumnName("parent_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("父编号"); b.Property("PathCode") .HasMaxLength(50) .HasColumnType("character varying(50)") - .HasColumnName("path_code"); + .HasColumnName("path_code") + .HasComment("路径编码"); b.Property("SimpleCode") .HasMaxLength(20) @@ -722,7 +754,8 @@ namespace Shentun.Peis.Migrations b.Property("CountryCode") .HasMaxLength(6) .HasColumnType("character varying(6)") - .HasColumnName("country_code"); + .HasColumnName("country_code") + .HasComment("国家标准码"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") @@ -1149,7 +1182,8 @@ namespace Shentun.Peis.Migrations b.Property("SettleAccountId") .HasColumnType("uuid") - .HasColumnName("settle_account_id"); + .HasColumnName("settle_account_id") + .HasComment("结账ID"); b.HasKey("Id"); @@ -1170,12 +1204,14 @@ namespace Shentun.Peis.Migrations .HasMaxLength(4) .HasColumnType("character(4)") .HasColumnName("pay_mode_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("支付方式ID"); b.Property("BackMoeny") .HasPrecision(10, 2) .HasColumnType("numeric(10,2)") - .HasColumnName("back_moeny"); + .HasColumnName("back_moeny") + .HasComment("退费金额"); b.HasKey("ChargeBackId", "PayModeId") .HasName("pk_department_charge_back_pay"); @@ -1281,7 +1317,8 @@ namespace Shentun.Peis.Migrations b.Property("CommonCharTypeId") .HasColumnType("uuid") .HasColumnName("common_char_type_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("常用字符类别编号"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") @@ -1294,7 +1331,8 @@ namespace Shentun.Peis.Migrations b.Property("DisplayName") .HasMaxLength(1) .HasColumnType("character varying(1)") - .HasColumnName("display_name"); + .HasColumnName("display_name") + .HasComment("名称"); b.Property("DisplayOrder") .HasColumnType("integer") @@ -1342,7 +1380,8 @@ namespace Shentun.Peis.Migrations b.Property("DisplayName") .HasMaxLength(20) .HasColumnType("character varying(20)") - .HasColumnName("display_name"); + .HasColumnName("display_name") + .HasComment("名称"); b.Property("DisplayOrder") .ValueGeneratedOnAdd() @@ -1378,12 +1417,14 @@ namespace Shentun.Peis.Migrations .HasMaxLength(1) .HasColumnType("character(1)") .HasColumnName("contact_method_type") - .HasDefaultValueSql("'M'::bpchar"); + .HasDefaultValueSql("'M'::bpchar") + .HasComment("联系方式类别-比如0-手机、1-电子邮箱"); b.Property("ContactMethodValue") .HasMaxLength(15) .HasColumnType("character varying(15)") - .HasColumnName("contact_method_value"); + .HasColumnName("contact_method_value") + .HasComment("联系方式,比如18911254911,839860190@qq.com"); b.Property("ContactPersonId") .HasColumnType("uuid"); @@ -1410,7 +1451,7 @@ namespace Shentun.Peis.Migrations b.ToTable("contact_method"); - b.HasComment("联系方式"); + b.HasComment("联系方式新增量主键,更新映射关系"); }); modelBuilder.Entity("Shentun.Peis.Models.ContactPerson", b => @@ -1430,12 +1471,14 @@ namespace Shentun.Peis.Migrations b.Property("CustomerOrgId") .HasColumnType("uuid") .HasColumnName("customer_org_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("客户单位编号"); b.Property("DisplayName") .HasMaxLength(20) .HasColumnType("character varying(20)") - .HasColumnName("display_name"); + .HasColumnName("display_name") + .HasComment("姓名"); b.Property("DisplayOrder") .HasColumnType("integer") @@ -1452,7 +1495,8 @@ namespace Shentun.Peis.Migrations b.Property("Remark") .HasMaxLength(50) .HasColumnType("character varying(50)") - .HasColumnName("remark"); + .HasColumnName("remark") + .HasComment("备注"); b.Property("SimpleCode") .HasMaxLength(20) @@ -1462,7 +1506,8 @@ namespace Shentun.Peis.Migrations b.Property("Title") .HasMaxLength(20) .HasColumnType("character varying(20)") - .HasColumnName("title"); + .HasColumnName("title") + .HasComment("职务"); b.HasKey("Id"); @@ -1494,12 +1539,14 @@ namespace Shentun.Peis.Migrations b.Property("CriticalValueTypeId") .HasColumnType("uuid") .HasColumnName("critical_value_type_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("危急值类别编号"); b.Property("DisplayName") .HasMaxLength(100) .HasColumnType("character varying(100)") - .HasColumnName("display_name"); + .HasColumnName("display_name") + .HasComment("名称"); b.Property("DisplayOrder") .HasColumnType("integer") @@ -1542,7 +1589,8 @@ namespace Shentun.Peis.Migrations b.Property("DisplayName") .HasMaxLength(40) .HasColumnType("character varying(40)") - .HasColumnName("display_name"); + .HasColumnName("display_name") + .HasComment("名称"); b.Property("DisplayOrder") .ValueGeneratedOnAdd() @@ -1561,12 +1609,14 @@ namespace Shentun.Peis.Migrations b.Property("ParentId") .HasColumnType("uuid") .HasColumnName("parent_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("父编号"); b.Property("PathCode") .HasMaxLength(50) .HasColumnType("character varying(50)") - .HasColumnName("path_code"); + .HasColumnName("path_code") + .HasComment("路径编码"); b.HasKey("Id"); @@ -1631,12 +1681,14 @@ namespace Shentun.Peis.Migrations b.Property("InvoiceName") .HasMaxLength(50) .HasColumnType("character varying(50)") - .HasColumnName("invoice_name"); + .HasColumnName("invoice_name") + .HasComment("开票名称"); b.Property("IsLock") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("is_lock"); + .HasColumnName("is_lock") + .HasComment("锁住"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") @@ -1659,12 +1711,14 @@ namespace Shentun.Peis.Migrations b.Property("ParentId") .HasColumnType("uuid") .HasColumnName("parent_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("父编号"); b.Property("PathCode") .HasMaxLength(60) .HasColumnType("character varying(60)") - .HasColumnName("path_code"); + .HasColumnName("path_code") + .HasComment("路径编码"); b.Property("PostalCode") .HasMaxLength(10) @@ -1681,7 +1735,8 @@ namespace Shentun.Peis.Migrations b.Property("ShortName") .HasMaxLength(20) .HasColumnType("character varying(20)") - .HasColumnName("short_name"); + .HasColumnName("short_name") + .HasComment("简称"); b.Property("SimpleCode") .HasMaxLength(50) @@ -1694,7 +1749,8 @@ namespace Shentun.Peis.Migrations .HasMaxLength(1) .HasColumnType("character(1)") .HasColumnName("status_flag") - .HasDefaultValueSql("0"); + .HasDefaultValueSql("0") + .HasComment("状态"); b.Property("Telephone") .HasMaxLength(50) @@ -1722,7 +1778,8 @@ namespace Shentun.Peis.Migrations b.Property("ChargeFlag") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("charge_flag"); + .HasColumnName("charge_flag") + .HasComment("收退费标志"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") @@ -1734,7 +1791,8 @@ namespace Shentun.Peis.Migrations b.Property("CustomerOrgRegisterId") .HasColumnType("uuid") - .HasColumnName("customer_org_register_id"); + .HasColumnName("customer_org_register_id") + .HasComment("客户单位登记ID"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") @@ -1747,11 +1805,13 @@ namespace Shentun.Peis.Migrations b.Property("Payer") .HasMaxLength(50) .HasColumnType("character varying(50)") - .HasColumnName("payer"); + .HasColumnName("payer") + .HasComment("付款人"); b.Property("SettleAccountId") .HasColumnType("uuid") - .HasColumnName("settle_account_id"); + .HasColumnName("settle_account_id") + .HasComment("结算账户ID"); b.HasKey("Id"); @@ -1777,7 +1837,8 @@ namespace Shentun.Peis.Migrations b.Property("CustomerOrgChargeId") .HasColumnType("uuid") - .HasColumnName("customer_org_charge_id"); + .HasColumnName("customer_org_charge_id") + .HasComment("收费编号"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") @@ -1789,7 +1850,8 @@ namespace Shentun.Peis.Migrations b.Property("SettleAccountId") .HasColumnType("uuid") - .HasColumnName("settle_account_id"); + .HasColumnName("settle_account_id") + .HasComment("结算账户ID"); b.HasKey("Id"); @@ -1810,12 +1872,14 @@ namespace Shentun.Peis.Migrations .HasMaxLength(4) .HasColumnType("character(4)") .HasColumnName("pay_mode_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("支付方式"); b.Property("BackMoeny") .HasPrecision(10, 2) .HasColumnType("numeric(10,2)") - .HasColumnName("back_moeny"); + .HasColumnName("back_moeny") + .HasComment("退费金额"); b.HasKey("CustomerOrgChargeBackId", "PayModeId") .HasName("pk_org_charge_back_pay"); @@ -1835,7 +1899,8 @@ namespace Shentun.Peis.Migrations b.Property("ChargeMoney") .HasPrecision(10, 2) .HasColumnType("numeric(10,2)") - .HasColumnName("charge_money"); + .HasColumnName("charge_money") + .HasComment("支付金额"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") @@ -1857,7 +1922,8 @@ namespace Shentun.Peis.Migrations .HasMaxLength(4) .HasColumnType("character(4)") .HasColumnName("pay_mode_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("支付方式"); b.HasKey("Id"); @@ -1970,17 +2036,20 @@ namespace Shentun.Peis.Migrations b.Property("CustomerOrgGroupId") .HasColumnType("uuid") .HasColumnName("customer_org_group_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("分组编号"); b.Property("AsbitemId") .HasColumnType("uuid") .HasColumnName("asbitem_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("组合项目编号"); b.Property("Price") .HasPrecision(10, 2) .HasColumnType("numeric(10,2)") - .HasColumnName("price"); + .HasColumnName("price") + .HasComment("价格"); b.HasKey("CustomerOrgGroupId", "AsbitemId") .HasName("pk_org_group_detail"); @@ -2045,12 +2114,14 @@ namespace Shentun.Peis.Migrations b.Property("RegisterName") .HasMaxLength(50) .HasColumnType("character varying(50)") - .HasColumnName("register_name"); + .HasColumnName("register_name") + .HasComment("计划名称"); b.Property("RegisterNo") .HasMaxLength(12) .HasColumnType("character varying(12)") - .HasColumnName("register_no"); + .HasColumnName("register_no") + .HasComment("计划号"); b.HasKey("Id"); @@ -2078,7 +2149,8 @@ namespace Shentun.Peis.Migrations b.Property("DisplayName") .HasMaxLength(20) .HasColumnType("character varying(20)") - .HasColumnName("display_name"); + .HasColumnName("display_name") + .HasComment("名称"); b.Property("DisplayOrder") .HasColumnType("integer") @@ -2104,7 +2176,7 @@ namespace Shentun.Peis.Migrations b.ToTable("customer_org_type"); - b.HasComment("团体类型设置"); + b.HasComment("客户单位类别"); }); modelBuilder.Entity("Shentun.Peis.Models.Department", b => @@ -2178,7 +2250,7 @@ namespace Shentun.Peis.Migrations b.ToTable("department"); - b.HasComment("部门"); + b.HasComment("部门,已经废弃"); }); modelBuilder.Entity("Shentun.Peis.Models.DeviceType", b => @@ -2249,12 +2321,14 @@ namespace Shentun.Peis.Migrations b.Property("DiagnosisLevelId") .HasColumnType("uuid") - .HasColumnName("diagnosis_level_id"); + .HasColumnName("diagnosis_level_id") + .HasComment("诊断级别"); b.Property("DisplayName") .HasMaxLength(100) .HasColumnType("character varying(100)") - .HasColumnName("display_name"); + .HasColumnName("display_name") + .HasComment("名称"); b.Property("DisplayOrder") .HasColumnType("integer") @@ -2265,22 +2339,26 @@ namespace Shentun.Peis.Migrations .HasMaxLength(1) .HasColumnType("character(1)") .HasColumnName("for_sex_id") - .HasDefaultValueSql("'A'::bpchar"); + .HasDefaultValueSql("'A'::bpchar") + .HasComment("适用性别"); b.Property("IsIll") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("is_ill"); + .HasColumnName("is_ill") + .HasComment("是疾病"); b.Property("IsSummaryTemplate") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("is_summary_template"); + .HasColumnName("is_summary_template") + .HasComment("是总检模板"); b.Property("ItemTypeId") .HasColumnType("uuid") .HasColumnName("item_type_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("项目类别"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") @@ -2298,7 +2376,8 @@ namespace Shentun.Peis.Migrations b.Property("SuggestionName") .HasMaxLength(100) .HasColumnType("character varying(100)") - .HasColumnName("suggestion_name"); + .HasColumnName("suggestion_name") + .HasComment("建议名称"); b.HasKey("Id"); @@ -2363,7 +2442,8 @@ namespace Shentun.Peis.Migrations b.Property("DisplayName") .HasMaxLength(20) .HasColumnType("character varying(20)") - .HasColumnName("display_name"); + .HasColumnName("display_name") + .HasComment("名称"); b.Property("DisplayOrder") .HasColumnType("integer") @@ -2404,7 +2484,8 @@ namespace Shentun.Peis.Migrations b.Property("DisplayName") .HasMaxLength(20) .HasColumnType("character varying(20)") - .HasColumnName("display_name"); + .HasColumnName("display_name") + .HasComment("名称"); b.Property("DisplayOrder") .HasColumnType("integer") @@ -2438,12 +2519,14 @@ namespace Shentun.Peis.Migrations b.Property("DiagnosisTemplateId") .HasColumnType("uuid") .HasColumnName("diagnosis_template_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("诊断模板编号"); b.Property("DiagnosisId") .HasColumnType("uuid") .HasColumnName("diagnosis_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("诊断编号"); b.HasKey("DiagnosisTemplateId", "DiagnosisId") .HasName("pk_diagnosis_template_detail"); @@ -2472,7 +2555,8 @@ namespace Shentun.Peis.Migrations b.Property("DisplayName") .HasMaxLength(20) .HasColumnType("character varying(20)") - .HasColumnName("display_name"); + .HasColumnName("display_name") + .HasComment("名称"); b.Property("DisplayOrder") .HasColumnType("integer") @@ -2489,12 +2573,14 @@ namespace Shentun.Peis.Migrations b.Property("ParentId") .HasColumnType("uuid") .HasColumnName("parent_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("父编号"); b.Property("PathCode") .HasMaxLength(20) .HasColumnType("character varying(20)") - .HasColumnName("path_code"); + .HasColumnName("path_code") + .HasComment("路径编码"); b.HasKey("Id"); @@ -2520,7 +2606,8 @@ namespace Shentun.Peis.Migrations b.Property("DisplayName") .HasMaxLength(20) .HasColumnType("character varying(20)") - .HasColumnName("display_name"); + .HasColumnName("display_name") + .HasComment("名称"); b.Property("DisplayOrder") .HasColumnType("smallint") @@ -2542,6 +2629,8 @@ namespace Shentun.Peis.Migrations b.HasKey("Id"); b.ToTable("follow_up_mode"); + + b.HasComment("随访方式"); }); modelBuilder.Entity("Shentun.Peis.Models.FollowUpPlan", b => @@ -2552,7 +2641,8 @@ namespace Shentun.Peis.Migrations b.Property("Content") .HasMaxLength(200) .HasColumnType("character varying(200)") - .HasColumnName("content"); + .HasColumnName("content") + .HasComment("随访内容"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") @@ -2564,26 +2654,31 @@ namespace Shentun.Peis.Migrations b.Property("CycleDays") .HasColumnType("smallint") - .HasColumnName("cycle_days"); + .HasColumnName("cycle_days") + .HasComment("周期天数"); b.Property("DoctorUserId") .HasColumnType("uuid") - .HasColumnName("doctor_user_id"); + .HasColumnName("doctor_user_id") + .HasComment("医生"); b.Property("FollowUpModeId") .HasColumnType("uuid") .HasColumnName("follow_up_mode_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("随访方式"); b.Property("FollowUpTypeId") .HasColumnType("uuid") .HasColumnName("follow_up_type_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("随访类别"); b.Property("IsLoop") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("is_loop"); + .HasColumnName("is_loop") + .HasComment("是否循环"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") @@ -2596,24 +2691,30 @@ namespace Shentun.Peis.Migrations b.Property("PerfomFlag") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("perfom_flag"); + .HasColumnName("perfom_flag") + .HasComment("执行标志"); b.Property("PerfomTime") .HasColumnType("timestamp without time zone") - .HasColumnName("perfom_time"); + .HasColumnName("perfom_time") + .HasComment("执行时间"); b.Property("PerfomUserId") .HasColumnType("uuid") - .HasColumnName("perfom_user_id"); + .HasColumnName("perfom_user_id") + .HasComment("执行者用户ID"); b.Property("Remark") .HasMaxLength(100) .HasColumnType("character varying(100)") - .HasColumnName("remark"); + .HasColumnName("remark") + .HasComment("备注"); b.HasKey("Id"); b.ToTable("follow_up_plan"); + + b.HasComment("随访计划"); }); modelBuilder.Entity("Shentun.Peis.Models.FollowUpType", b => @@ -2633,7 +2734,8 @@ namespace Shentun.Peis.Migrations b.Property("DisplayName") .HasMaxLength(20) .HasColumnType("character varying(20)") - .HasColumnName("display_name"); + .HasColumnName("display_name") + .HasComment("名称"); b.Property("DisplayOrder") .HasColumnType("smallint") @@ -2655,6 +2757,8 @@ namespace Shentun.Peis.Migrations b.HasKey("Id"); b.ToTable("follow_up_type"); + + b.HasComment("随访类别"); }); modelBuilder.Entity("Shentun.Peis.Models.ForSex", b => @@ -2682,7 +2786,7 @@ namespace Shentun.Peis.Migrations b.ToTable("for_sex"); - b.HasComment("可支持性别设置"); + b.HasComment("适用性别设置,固定编码"); }); modelBuilder.Entity("Shentun.Peis.Models.Grouping", b => @@ -2730,6 +2834,8 @@ namespace Shentun.Peis.Migrations .IsUnique(); b.ToTable("grouping"); + + b.HasComment("废弃"); }); modelBuilder.Entity("Shentun.Peis.Models.GuideType", b => @@ -2749,7 +2855,8 @@ namespace Shentun.Peis.Migrations b.Property("DisplayName") .HasMaxLength(20) .HasColumnType("character varying(20)") - .HasColumnName("display_name"); + .HasColumnName("display_name") + .HasComment("名称"); b.Property("DisplayOrder") .ValueGeneratedOnAdd() @@ -3063,7 +3170,8 @@ namespace Shentun.Peis.Migrations b.Property("DisplayName") .HasMaxLength(20) .HasColumnType("character varying(20)") - .HasColumnName("display_name"); + .HasColumnName("display_name") + .HasComment("名称"); b.Property("DisplayOrder") .HasColumnType("integer") @@ -3108,7 +3216,8 @@ namespace Shentun.Peis.Migrations b.Property("DisplayName") .HasMaxLength(50) .HasColumnType("character varying(50)") - .HasColumnName("display_name"); + .HasColumnName("display_name") + .HasComment("名称"); b.Property("DisplayOrder") .HasColumnType("integer") @@ -3146,7 +3255,8 @@ namespace Shentun.Peis.Migrations b.Property("CalculationFunction") .HasMaxLength(100) .HasColumnType("character varying(100)") - .HasColumnName("calculation_function"); + .HasColumnName("calculation_function") + .HasComment("计算函数"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") @@ -3159,17 +3269,20 @@ namespace Shentun.Peis.Migrations b.Property("DefaultResult") .HasMaxLength(200) .HasColumnType("character varying(200)") - .HasColumnName("default_result"); + .HasColumnName("default_result") + .HasComment("默认结果"); b.Property("DiagnosisFunction") .HasMaxLength(2000) .HasColumnType("character varying(2000)") - .HasColumnName("diagnosis_function"); + .HasColumnName("diagnosis_function") + .HasComment("诊断函数"); b.Property("DisplayName") .HasMaxLength(30) .HasColumnType("character varying(30)") - .HasColumnName("display_name"); + .HasColumnName("display_name") + .HasComment("名称"); b.Property("DisplayOrder") .HasColumnType("integer") @@ -3178,47 +3291,56 @@ namespace Shentun.Peis.Migrations b.Property("EnglishShortName") .HasMaxLength(20) .HasColumnType("character varying(20)") - .HasColumnName("english_short_name"); + .HasColumnName("english_short_name") + .HasComment("英文缩写"); b.Property("InputCheck") .HasMaxLength(100) .HasColumnType("character varying(100)") - .HasColumnName("input_check"); + .HasColumnName("input_check") + .HasComment("输入结果校验公式"); b.Property("IsActive") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("is_active"); + .HasColumnName("is_active") + .HasComment("启用"); b.Property("IsCalculationItem") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("is_calculation_item"); + .HasColumnName("is_calculation_item") + .HasComment("是计算项目"); b.Property("IsContinueProcess") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("is_continue_process"); + .HasColumnName("is_continue_process") + .HasComment("是继续处理"); b.Property("IsDiagnosisFunction") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("is_diagnosis_function"); + .HasColumnName("is_diagnosis_function") + .HasComment("启用诊断函数"); b.Property("IsNameIntoSummary") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("is_name_into_summary"); + .HasColumnName("is_name_into_summary") + .HasComment("名称进入小结"); b.Property("IsProduceSummary") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("is_produce_summary"); + .HasColumnName("is_produce_summary") + .HasComment("是生成小结"); b.Property("ItemTypeId") .HasColumnType("uuid") .HasColumnName("item_type_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("项目类别"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") @@ -3231,27 +3353,31 @@ namespace Shentun.Peis.Migrations b.Property("Price") .HasPrecision(10, 2) .HasColumnType("numeric(10,2)") - .HasColumnName("price"); + .HasColumnName("price") + .HasComment("价格"); b.Property("PriceItemId") .HasMaxLength(8) .HasColumnType("uuid") .HasColumnName("price_item_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("价表项目编码"); b.Property("ReferenceRangeTypeFlag") .ValueGeneratedOnAdd() .HasMaxLength(1) .HasColumnType("character(1)") .HasColumnName("reference_range_type_flag") - .HasDefaultValueSql("'E'::bpchar"); + .HasDefaultValueSql("'E'::bpchar") + .HasComment("参考范围类别0-无参考范围,1-数字型,2-字符型,3-性激素"); b.Property("ResultTemplateTypeFlag") .ValueGeneratedOnAdd() .HasMaxLength(1) .HasColumnType("character(1)") .HasColumnName("result_template_type_flag") - .HasDefaultValueSql("0"); + .HasDefaultValueSql("0") + .HasComment("结果模板类别标志"); b.Property("SimpleCode") .HasMaxLength(30) @@ -3261,7 +3387,8 @@ namespace Shentun.Peis.Migrations b.Property("UnitId") .HasColumnType("uuid") .HasColumnName("unit_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("单位"); b.HasKey("Id"); @@ -3292,7 +3419,8 @@ namespace Shentun.Peis.Migrations b.Property("DisplayName") .HasMaxLength(50) .HasColumnType("character varying(50)") - .HasColumnName("display_name"); + .HasColumnName("display_name") + .HasComment("名称"); b.Property("DisplayOrder") .HasColumnType("integer") @@ -3561,7 +3689,8 @@ namespace Shentun.Peis.Migrations b.Property("ItemId") .HasColumnType("uuid") .HasColumnName("item_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("项目编号"); b.HasKey("ItemTemplateId", "ItemId") .HasName("pk_item_template_detail"); @@ -3584,7 +3713,8 @@ namespace Shentun.Peis.Migrations .HasMaxLength(1) .HasColumnType("character(1)") .HasColumnName("check_type_flag") - .HasDefaultValueSql("'G'::bpchar"); + .HasDefaultValueSql("'G'::bpchar") + .HasComment("检查类别,0-普通检查,1-检验,2-影像检查"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") @@ -3597,7 +3727,8 @@ namespace Shentun.Peis.Migrations b.Property("DisplayName") .HasMaxLength(20) .HasColumnType("character varying(20)") - .HasColumnName("display_name"); + .HasColumnName("display_name") + .HasComment("名称"); b.Property("DisplayOrder") .ValueGeneratedOnAdd() @@ -3608,12 +3739,14 @@ namespace Shentun.Peis.Migrations b.Property("GuidTypeId") .HasColumnType("uuid") .HasColumnName("guid_type_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("指引类别"); b.Property("IsMergeAsbitem") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("is_merge_asbitem"); + .HasColumnName("is_merge_asbitem") + .HasComment("合并组合项目,Y-是,N-否"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") @@ -3626,22 +3759,26 @@ namespace Shentun.Peis.Migrations b.Property("MedicalReportTypeId") .HasColumnType("uuid") .HasColumnName("medical_report_type_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("体检报告类别"); b.Property("ParentId") .HasColumnType("uuid") .HasColumnName("parent_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("父id"); b.Property("PathCode") .HasMaxLength(50) .HasColumnType("character varying(50)") - .HasColumnName("path_code"); + .HasColumnName("path_code") + .HasComment("路径编码"); b.Property("SimpleCode") .HasMaxLength(20) .HasColumnType("character varying(20)") - .HasColumnName("simple_code"); + .HasColumnName("simple_code") + .HasComment("自定义简码"); b.HasKey("Id"); @@ -3673,12 +3810,14 @@ namespace Shentun.Peis.Migrations b.Property("IsPrint") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("is_print"); + .HasColumnName("is_print") + .HasComment("是否已打印"); b.Property("IsSignIn") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("is_sign_in"); + .HasColumnName("is_sign_in") + .HasComment("是签收"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") @@ -3690,43 +3829,52 @@ namespace Shentun.Peis.Migrations b.Property("LisRequestNo") .HasColumnType("uuid") - .HasColumnName("lis_request_no"); + .HasColumnName("lis_request_no") + .HasComment("检验申请单号"); b.Property("PatientRegisterId") .HasColumnType("uuid") - .HasColumnName("patient_register_id"); + .HasColumnName("patient_register_id") + .HasComment("病人登记ID"); b.Property("SampleContainerId") .HasColumnType("uuid") .HasColumnName("sample_container_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("标本容器编号"); b.Property("SampleTypeId") .HasColumnType("uuid") .HasColumnName("sample_type_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("标本类型"); b.Property("Sampler") .HasMaxLength(16) .HasColumnType("character varying(16)") - .HasColumnName("sampler"); + .HasColumnName("sampler") + .HasComment("采样人姓名"); b.Property("SamplingTime") .HasColumnType("date") - .HasColumnName("sampling_time"); + .HasColumnName("sampling_time") + .HasComment("采样时间"); b.Property("SignInOrder") .HasColumnType("integer") - .HasColumnName("sign_in_order"); + .HasColumnName("sign_in_order") + .HasComment("签收顺序"); b.Property("SignInPerson") .HasMaxLength(16) .HasColumnType("character varying(16)") - .HasColumnName("sign_in_person"); + .HasColumnName("sign_in_person") + .HasComment("签收人姓名"); b.Property("SignInTime") .HasColumnType("date") - .HasColumnName("sign_in_time"); + .HasColumnName("sign_in_time") + .HasComment("签收时间"); b.HasKey("Id"); @@ -3966,7 +4114,8 @@ namespace Shentun.Peis.Migrations b.Property("AsbitemId") .HasColumnType("uuid") .HasColumnName("asbitem_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("组合项目编号"); b.HasKey("MedicalPackageId", "AsbitemId") .HasName("pk_medical_package_detail"); @@ -3995,7 +4144,8 @@ namespace Shentun.Peis.Migrations b.Property("DisplayName") .HasMaxLength(20) .HasColumnType("character varying(20)") - .HasColumnName("display_name"); + .HasColumnName("display_name") + .HasComment("名称"); b.Property("DisplayOrder") .ValueGeneratedOnAdd() @@ -4247,7 +4397,7 @@ namespace Shentun.Peis.Migrations b.ToTable("operate_log"); - b.HasComment("操作日志"); + b.HasComment("操作日志,已经废弃"); }); modelBuilder.Entity("Shentun.Peis.Models.OrganizationUnitsCustomerOrg", b => @@ -4255,12 +4405,14 @@ namespace Shentun.Peis.Migrations b.Property("CustomerOrgId") .HasColumnType("uuid") .HasColumnName("customer_org_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("客户单位编号"); b.Property("OrganizationUnitId") .HasColumnType("uuid") .HasColumnName("organization_unit_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("体检中心编号"); b.HasKey("CustomerOrgId", "OrganizationUnitId") .HasName("pk_medical_center_org"); @@ -4280,16 +4432,19 @@ namespace Shentun.Peis.Migrations b.Property("Address") .HasMaxLength(100) .HasColumnType("character varying(100)") - .HasColumnName("address"); + .HasColumnName("address") + .HasComment("地址"); b.Property("BirthDate") .HasColumnType("date") - .HasColumnName("birth_date"); + .HasColumnName("birth_date") + .HasComment("出生日期"); b.Property("BirthPlaceId") .HasColumnType("uuid") .HasColumnName("birth_place_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("出生地"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") @@ -4302,17 +4457,20 @@ namespace Shentun.Peis.Migrations b.Property("DisplayName") .HasMaxLength(30) .HasColumnType("character varying(30)") - .HasColumnName("display_name"); + .HasColumnName("display_name") + .HasComment("姓名"); b.Property("Email") .HasMaxLength(50) .HasColumnType("character varying(50)") - .HasColumnName("email"); + .HasColumnName("email") + .HasComment("email"); b.Property("IdNo") .HasMaxLength(18) .HasColumnType("character varying(18)") - .HasColumnName("id_no"); + .HasColumnName("id_no") + .HasComment("身份证号"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") @@ -4325,40 +4483,56 @@ namespace Shentun.Peis.Migrations b.Property("MaritalStatusId") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("marital_status_id"); + .HasColumnName("marital_status_id") + .HasComment("婚姻状况"); b.Property("MobileTelephone") .HasMaxLength(20) .HasColumnType("character varying(20)") - .HasColumnName("mobile_telephone"); + .HasColumnName("mobile_telephone") + .HasComment("手机号"); b.Property("NationId") .HasColumnType("uuid") .HasColumnName("nation_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("民族编号"); + + b.Property("PatientNo") + .HasMaxLength(30) + .HasColumnType("character varying(30)") + .HasColumnName("patient_no") + .HasComment("档案号"); b.Property("PatientPassword") .HasMaxLength(10) .HasColumnType("character varying(10)") - .HasColumnName("patient_password"); + .HasColumnName("patient_password") + .HasComment("登录密码"); b.Property("PostalCode") .HasMaxLength(10) .HasColumnType("character varying(10)") - .HasColumnName("postal_code"); + .HasColumnName("postal_code") + .HasComment("邮政编码"); b.Property("SexId") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("sex_id"); + .HasColumnName("sex_id") + .HasComment("性别"); b.Property("Telephone") .HasMaxLength(20) .HasColumnType("character varying(20)") - .HasColumnName("telephone"); + .HasColumnName("telephone") + .HasComment("电话"); b.HasKey("Id"); + b.HasIndex("PatientNo") + .IsUnique(); + b.HasIndex(new[] { "IdNo" }, "ix_patient"); b.HasIndex(new[] { "DisplayName" }, "ix_patient_1"); @@ -4634,16 +4808,19 @@ namespace Shentun.Peis.Migrations b.Property("AuditDate") .HasColumnType("date") - .HasColumnName("audit_date"); + .HasColumnName("audit_date") + .HasComment("审核日期"); b.Property("AuditDoctor") .HasMaxLength(16) .HasColumnType("character varying(16)") - .HasColumnName("audit_doctor"); + .HasColumnName("audit_doctor") + .HasComment("审核医生"); b.Property("BirthDate") .HasColumnType("date") - .HasColumnName("birth_date"); + .HasColumnName("birth_date") + .HasComment("出生日期"); b.Property("CompleteFlag") .ValueGeneratedOnAdd() @@ -4675,11 +4852,13 @@ namespace Shentun.Peis.Migrations b.Property("CustomerOrgRegisterId") .HasColumnType("uuid") - .HasColumnName("customer_org_register_id"); + .HasColumnName("customer_org_register_id") + .HasComment("客户单位登记ID"); b.Property("GuidePrintTimes") .HasColumnType("smallint") - .HasColumnName("guide_print_times"); + .HasColumnName("guide_print_times") + .HasComment("指引单打印次数"); b.Property("InterposeMeasure") .HasMaxLength(1) @@ -4690,12 +4869,14 @@ namespace Shentun.Peis.Migrations b.Property("IsAudit") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("is_audit"); + .HasColumnName("is_audit") + .HasComment("审核"); b.Property("IsLock") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("is_lock"); + .HasColumnName("is_lock") + .HasComment("锁住"); b.Property("IsMedicalStart") .HasMaxLength(1) @@ -4706,27 +4887,32 @@ namespace Shentun.Peis.Migrations b.Property("IsNameHide") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("is_name_hide"); + .HasColumnName("is_name_hide") + .HasComment("隐藏姓名"); b.Property("IsPhoneFollow") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("is_phone_follow"); + .HasColumnName("is_phone_follow") + .HasComment("电话随访"); b.Property("IsRecoverGuide") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("is_recover_guide"); + .HasColumnName("is_recover_guide") + .HasComment("指引单收回"); b.Property("IsUpload") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("is_upload"); + .HasColumnName("is_upload") + .HasComment("是否上传到WEB"); b.Property("IsVip") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("is_vip"); + .HasColumnName("is_vip") + .HasComment("vip客户"); b.Property("JobCardNo") .HasMaxLength(20) @@ -4765,7 +4951,8 @@ namespace Shentun.Peis.Migrations b.Property("MedicalCardNo") .HasMaxLength(20) .HasColumnType("character varying(20)") - .HasColumnName("medical_card_no"); + .HasColumnName("medical_card_no") + .HasComment("体检卡号"); b.Property("MedicalConclusionId") .HasColumnType("uuid") @@ -4799,9 +4986,11 @@ namespace Shentun.Peis.Migrations b.Property("OrganizationUnitId") .HasColumnType("uuid") - .HasColumnName("organization_unit_id"); + .HasColumnName("organization_unit_id") + .HasComment("体检中心ID"); b.Property("PatientId") + .HasMaxLength(10) .HasColumnType("uuid") .HasColumnName("patient_id") .HasComment("档案号"); @@ -4832,7 +5021,8 @@ namespace Shentun.Peis.Migrations b.Property("Remark") .HasMaxLength(50) .HasColumnType("character varying(50)") - .HasColumnName("remark"); + .HasColumnName("remark") + .HasComment("备注"); b.Property("ReportPrintTimes") .HasColumnType("smallint") @@ -4848,7 +5038,7 @@ namespace Shentun.Peis.Migrations b.Property("SexHormoneTermId") .HasColumnType("uuid") .HasColumnName("sex_hormone_term_id") - .IsFixedLength(); + .HasComment("性激素期限"); b.Property("SexId") .HasMaxLength(1) @@ -4870,7 +5060,8 @@ namespace Shentun.Peis.Migrations b.Property("ThirdInfo") .HasMaxLength(20) .HasColumnType("character varying(20)") - .HasColumnName("third_info"); + .HasColumnName("third_info") + .HasComment("附加第三方信息"); b.HasKey("Id"); @@ -4920,6 +5111,8 @@ namespace Shentun.Peis.Migrations b.HasIndex("SymptomId"); b.ToTable("patient_symptom"); + + b.HasComment("职业病-体检病人症状"); }); modelBuilder.Entity("Shentun.Peis.Models.PayMode", b => @@ -4928,7 +5121,8 @@ namespace Shentun.Peis.Migrations .HasMaxLength(4) .HasColumnType("character(4)") .HasColumnName("id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("编号,固定编码"); b.Property("DisplayName") .HasMaxLength(20) @@ -5020,11 +5214,13 @@ namespace Shentun.Peis.Migrations b.Property("FollowContent") .HasMaxLength(200) .HasColumnType("character varying(200)") - .HasColumnName("follow_content"); + .HasColumnName("follow_content") + .HasComment("随访内容"); b.Property("FollowUpPlanId") .HasColumnType("uuid") - .HasColumnName("follow_up_plan_id"); + .HasColumnName("follow_up_plan_id") + .HasComment("随访计划ID"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") @@ -5036,12 +5232,14 @@ namespace Shentun.Peis.Migrations b.Property("PatientRegisterId") .HasColumnType("uuid") - .HasColumnName("patient_register_id"); + .HasColumnName("patient_register_id") + .HasComment("病人登记ID"); b.Property("ReplyContent") .HasMaxLength(200) .HasColumnType("character varying(200)") - .HasColumnName("reply_content"); + .HasColumnName("reply_content") + .HasComment("回复内容"); b.HasKey("Id"); @@ -5222,7 +5420,8 @@ namespace Shentun.Peis.Migrations b.Property("DisplayName") .HasMaxLength(50) .HasColumnType("character varying(50)") - .HasColumnName("display_name"); + .HasColumnName("display_name") + .HasComment("名称"); b.Property("DisplayOrder") .HasColumnType("integer") @@ -5231,7 +5430,8 @@ namespace Shentun.Peis.Migrations b.Property("InvoiceItemTypeId") .HasColumnType("uuid") .HasColumnName("invoice_item_type_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("发票项目类别ID"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") @@ -5244,12 +5444,14 @@ namespace Shentun.Peis.Migrations b.Property("Price") .HasPrecision(10, 2) .HasColumnType("numeric(10,2)") - .HasColumnName("price"); + .HasColumnName("price") + .HasComment("价格"); b.Property("PriceItemCode") .HasMaxLength(50) .HasColumnType("character varying(50)") - .HasColumnName("price_item_code"); + .HasColumnName("price_item_code") + .HasComment("价表编码"); b.Property("SimpleCode") .HasMaxLength(50) @@ -5307,7 +5509,7 @@ namespace Shentun.Peis.Migrations b.ToTable("primarykey_builder"); - b.HasComment("主键产生器"); + b.HasComment("主键产生器,废弃"); }); modelBuilder.Entity("Shentun.Peis.Models.QueueRegister", b => @@ -5317,14 +5519,16 @@ namespace Shentun.Peis.Migrations b.Property("CallTime") .HasColumnType("timestamp without time zone") - .HasColumnName("call_time"); + .HasColumnName("call_time") + .HasComment("叫号时间"); b.Property("CompleteFlag") .ValueGeneratedOnAdd() .HasMaxLength(1) .HasColumnType("character(1)") .HasColumnName("complete_flag") - .HasDefaultValueSql("0"); + .HasDefaultValueSql("0") + .HasComment("完成标志"); b.Property("CreationTime") .ValueGeneratedOnAdd() @@ -5338,7 +5542,8 @@ namespace Shentun.Peis.Migrations b.Property("DisplayOrder") .HasColumnType("integer") - .HasColumnName("display_order"); + .HasColumnName("display_order") + .HasComment("排队顺序"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") @@ -5353,16 +5558,19 @@ namespace Shentun.Peis.Migrations .HasMaxLength(1) .HasColumnType("character(1)") .HasColumnName("no_complete_reason") - .HasDefaultValueSql("0"); + .HasDefaultValueSql("0") + .HasComment("未完成原因"); b.Property("PatientRegisterId") .HasColumnType("uuid") - .HasColumnName("patient_register_id"); + .HasColumnName("patient_register_id") + .HasComment("病人登记ID"); b.Property("RoomId") .HasColumnType("uuid") .HasColumnName("room_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("房间ID"); b.HasKey("Id"); @@ -5436,7 +5644,8 @@ namespace Shentun.Peis.Migrations b.Property("ReferenceRangeTypeFlag") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("reference_range_type_flag"); + .HasColumnName("reference_range_type_flag") + .HasComment("参考范围类别0-无参考范围,1-数字型,2-字符型,3-性激素"); b.Property("ReferenceRangeValue") .HasMaxLength(150) @@ -5462,7 +5671,8 @@ namespace Shentun.Peis.Migrations { b.Property("RegisterCheckId") .HasColumnType("uuid") - .HasColumnName("register_check_id"); + .HasColumnName("register_check_id") + .HasComment("检查单ID"); b.Property("AsbitemId") .HasMaxLength(6) @@ -5473,7 +5683,8 @@ namespace Shentun.Peis.Migrations b.Property("Amount") .HasColumnType("smallint") - .HasColumnName("amount"); + .HasColumnName("amount") + .HasComment("数量"); b.Property("ChargePrice") .HasPrecision(10, 2) @@ -5490,7 +5701,8 @@ namespace Shentun.Peis.Migrations b.Property("LisRequestId") .HasMaxLength(20) .HasColumnType("uuid") - .HasColumnName("lis_request_id"); + .HasColumnName("lis_request_id") + .HasComment("LIS申请ID"); b.Property("PatientRegisterId") .HasColumnType("uuid") @@ -5507,7 +5719,8 @@ namespace Shentun.Peis.Migrations b.Property("RegisterAsbitemId") .HasColumnType("uuid") - .HasColumnName("register_asbitem_id"); + .HasColumnName("register_asbitem_id") + .HasComment("主键"); b.Property("StandardPrice") .HasPrecision(10, 2) @@ -5535,35 +5748,42 @@ namespace Shentun.Peis.Migrations b.Property("AuditTime") .HasColumnType("timestamp without time zone") - .HasColumnName("audit_time"); + .HasColumnName("audit_time") + .HasComment("审核时间"); b.Property("AuditorUserId") .HasColumnType("uuid") - .HasColumnName("auditor_user_id"); + .HasColumnName("auditor_user_id") + .HasComment("审核医生ID"); b.Property("CheckDate") .HasColumnType("date") - .HasColumnName("check_date"); + .HasColumnName("check_date") + .HasComment("检查日期"); b.Property("CheckDoctorId") .HasColumnType("uuid") - .HasColumnName("check_doctor_id"); + .HasColumnName("check_doctor_id") + .HasComment("检查医生ID"); b.Property("CheckRequestNo") .HasMaxLength(20) .HasColumnType("uuid") - .HasColumnName("check_request_no"); + .HasColumnName("check_request_no") + .HasComment("检查单号"); b.Property("CheckRequestPrintTimes") .HasColumnType("smallint") - .HasColumnName("check_request_print_times"); + .HasColumnName("check_request_print_times") + .HasComment("检查申请单打印次数"); b.Property("CompleteFlag") .ValueGeneratedOnAdd() .HasMaxLength(1) .HasColumnType("character(1)") .HasColumnName("complete_flag") - .HasDefaultValueSql("0"); + .HasDefaultValueSql("0") + .HasComment("完成标志"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") @@ -5576,47 +5796,56 @@ namespace Shentun.Peis.Migrations b.Property("CriticalValue") .HasMaxLength(100) .HasColumnType("character varying(100)") - .HasColumnName("critical_value"); + .HasColumnName("critical_value") + .HasComment("危急值"); b.Property("CriticalValueCreateDate") .HasColumnType("date") - .HasColumnName("critical_value_create_date"); + .HasColumnName("critical_value_create_date") + .HasComment("危急值创建日期"); b.Property("CriticalValueFlag") .ValueGeneratedOnAdd() .HasMaxLength(1) .HasColumnType("character(1)") .HasColumnName("critical_value_flag") - .HasDefaultValueSql("0"); + .HasDefaultValueSql("0") + .HasComment("危急值标志"); b.Property("CriticalValueProcessContent") .HasMaxLength(100) .HasColumnType("character varying(100)") - .HasColumnName("critical_value_process_content"); + .HasColumnName("critical_value_process_content") + .HasComment("危急值处理内容"); b.Property("CriticalValueProcessDate") .HasColumnType("date") - .HasColumnName("critical_value_process_date"); + .HasColumnName("critical_value_process_date") + .HasComment("危急值处理日期"); b.Property("CriticalValueProcessDoctor") .HasMaxLength(16) .HasColumnType("character varying(16)") - .HasColumnName("critical_value_process_doctor"); + .HasColumnName("critical_value_process_doctor") + .HasComment("危急值处理医生"); b.Property("CriticalValueProcessFlag") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("critical_value_process_flag"); + .HasColumnName("critical_value_process_flag") + .HasComment("危急值处理标志"); b.Property("IsAudit") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("is_audit"); + .HasColumnName("is_audit") + .HasComment("是审核"); b.Property("IsLock") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("is_lock"); + .HasColumnName("is_lock") + .HasComment("是否锁住"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") @@ -5629,7 +5858,8 @@ namespace Shentun.Peis.Migrations b.Property("ThirdInfo") .HasMaxLength(80) .HasColumnType("character varying(80)") - .HasColumnName("third_info"); + .HasColumnName("third_info") + .HasComment("第三方信息"); b.HasKey("Id"); @@ -5656,22 +5886,26 @@ namespace Shentun.Peis.Migrations b.Property("CriticalValue") .HasMaxLength(100) .HasColumnType("character varying(100)") - .HasColumnName("critical_value"); + .HasColumnName("critical_value") + .HasComment("危急值"); b.Property("Doctor") .HasMaxLength(16) .HasColumnType("character varying(16)") - .HasColumnName("doctor"); + .HasColumnName("doctor") + .HasComment("处理医生"); b.Property("IsComplete") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("is_complete"); + .HasColumnName("is_complete") + .HasComment("是否完成"); b.Property("ItemId") .HasColumnType("uuid") .HasColumnName("item_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("项目编号"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") @@ -5684,11 +5918,13 @@ namespace Shentun.Peis.Migrations b.Property("ProcessTypeFlag") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("process_type_flag"); + .HasColumnName("process_type_flag") + .HasComment("处理类别标志"); b.Property("RegisterCheckId") .HasColumnType("uuid") - .HasColumnName("register_check_id"); + .HasColumnName("register_check_id") + .HasComment("登记检查ID"); b.HasKey("Id"); @@ -5707,7 +5943,7 @@ namespace Shentun.Peis.Migrations .HasColumnType("uuid") .HasColumnName("item_id") .IsFixedLength() - .HasComment("项目"); + .HasComment("项目编号"); b.Property("CheckDate") .HasColumnType("date") @@ -5723,12 +5959,14 @@ namespace Shentun.Peis.Migrations b.Property("CriticalRangeValue") .HasMaxLength(50) .HasColumnType("character varying(50)") - .HasColumnName("critical_range_value"); + .HasColumnName("critical_range_value") + .HasComment("危急值范围"); b.Property("CriticalValue") .HasMaxLength(100) .HasColumnType("character varying(100)") - .HasColumnName("critical_value"); + .HasColumnName("critical_value") + .HasComment("危急值"); b.Property("ReferenceRangeValue") .ValueGeneratedOnAdd() @@ -5753,7 +5991,8 @@ namespace Shentun.Peis.Migrations b.Property("Unit") .HasMaxLength(20) .HasColumnType("character varying(20)") - .HasColumnName("unit"); + .HasColumnName("unit") + .HasComment("单位"); b.HasKey("RegisterCheckId", "ItemId") .HasName("pk_register_item_1"); @@ -5838,7 +6077,8 @@ namespace Shentun.Peis.Migrations b.Property("DisplayOrder") .HasColumnType("integer") - .HasColumnName("display_order"); + .HasColumnName("display_order") + .HasComment("显示顺序"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") @@ -5850,12 +6090,14 @@ namespace Shentun.Peis.Migrations b.Property("RegisterCheckId") .HasColumnType("uuid") - .HasColumnName("register_check_id"); + .HasColumnName("register_check_id") + .HasComment("登记检查ID"); b.Property("Suggestion") .HasMaxLength(100) .HasColumnType("character varying(100)") - .HasColumnName("suggestion"); + .HasColumnName("suggestion") + .HasComment("建议"); b.HasKey("Id"); @@ -5881,7 +6123,8 @@ namespace Shentun.Peis.Migrations b.Property("DisplayOrder") .HasColumnType("integer") - .HasColumnName("display_order"); + .HasColumnName("display_order") + .HasComment("顺序"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") @@ -5893,17 +6136,20 @@ namespace Shentun.Peis.Migrations b.Property("RegisterCheckId") .HasColumnType("uuid") - .HasColumnName("register_check_id"); + .HasColumnName("register_check_id") + .HasComment("登记检查ID"); b.Property("Summary") .HasMaxLength(500) .HasColumnType("character varying(500)") - .HasColumnName("summary"); + .HasColumnName("summary") + .HasComment("综述"); b.Property("SummaryFlag") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("summary_flag"); + .HasColumnName("summary_flag") + .HasComment("综述标志"); b.HasKey("Id"); @@ -5925,16 +6171,19 @@ namespace Shentun.Peis.Migrations .ValueGeneratedOnAdd() .HasColumnType("integer") .HasColumnName("data_input_background_color") - .HasDefaultValueSql("16777215"); + .HasDefaultValueSql("16777215") + .HasComment("数据录入报告单颜色"); b.Property("DataInputFontColor") .HasColumnType("integer") - .HasColumnName("data_input_font_color"); + .HasColumnName("data_input_font_color") + .HasComment("数据录入字体颜色"); b.Property("DataInputPrompt") .HasMaxLength(8) .HasColumnType("character varying(8)") - .HasColumnName("data_input_prompt"); + .HasColumnName("data_input_prompt") + .HasComment("数据录入提示"); b.Property("DisplayName") .HasMaxLength(20) @@ -5951,16 +6200,19 @@ namespace Shentun.Peis.Migrations .ValueGeneratedOnAdd() .HasColumnType("integer") .HasColumnName("report_background_color") - .HasDefaultValueSql("16777215"); + .HasDefaultValueSql("16777215") + .HasComment("报告单背景颜色"); b.Property("ReportFontColor") .HasColumnType("integer") - .HasColumnName("report_font_color"); + .HasColumnName("report_font_color") + .HasComment("报告单字体颜色"); b.Property("ReportPrompt") .HasMaxLength(8) .HasColumnType("character varying(8)") - .HasColumnName("report_prompt"); + .HasColumnName("report_prompt") + .HasComment("报告单提示"); b.HasKey("Id"); @@ -5989,7 +6241,8 @@ namespace Shentun.Peis.Migrations b.Property("DepartmentId") .HasColumnType("uuid") .HasColumnName("department_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment(""); b.Property("DisplayName") .HasMaxLength(20) @@ -6015,7 +6268,8 @@ namespace Shentun.Peis.Migrations b.Property("ItemTypeId") .HasColumnType("uuid") .HasColumnName("item_type_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("项目类别编号"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") @@ -6059,12 +6313,14 @@ namespace Shentun.Peis.Migrations b.Property("ContainerColor") .HasColumnType("integer") - .HasColumnName("container_color"); + .HasColumnName("container_color") + .HasComment("颜色"); b.Property("ContainerColorName") .HasMaxLength(20) .HasColumnType("character varying(20)") - .HasColumnName("container_color_name"); + .HasColumnName("container_color_name") + .HasComment("颜色名"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") @@ -6140,12 +6396,14 @@ namespace Shentun.Peis.Migrations b.Property("SampleContainerId") .HasColumnType("uuid") .HasColumnName("sample_container_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("标本容器ID"); b.Property("SampleTypeId") .HasColumnType("uuid") .HasColumnName("sample_type_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("标本类型ID"); b.Property("SimpleCode") .HasMaxLength(20) @@ -6176,7 +6434,8 @@ namespace Shentun.Peis.Migrations b.Property("AsbitemId") .HasColumnType("uuid") .HasColumnName("asbitem_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("组合项目编号"); b.HasKey("SampleGroupId", "AsbitemId") .HasName("pk_sample_group_detail"); @@ -6311,11 +6570,13 @@ namespace Shentun.Peis.Migrations b.Property("CompletedBy") .HasMaxLength(16) .HasColumnType("character varying(16)") - .HasColumnName("completed_by"); + .HasColumnName("completed_by") + .HasComment("结账人"); b.Property("CompletedTime") .HasColumnType("timestamp without time zone") - .HasColumnName("completed_time"); + .HasColumnName("completed_time") + .HasComment("结账时间"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") @@ -6328,7 +6589,8 @@ namespace Shentun.Peis.Migrations b.Property("IsComplete") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("is_complete"); + .HasColumnName("is_complete") + .HasComment("是完成"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") @@ -6381,13 +6643,15 @@ namespace Shentun.Peis.Migrations b.Property("AgeLowerLimit") .HasColumnType("smallint") - .HasColumnName("age_lower_limit"); + .HasColumnName("age_lower_limit") + .HasComment("年龄下限"); b.Property("AgeUpperLimit") .ValueGeneratedOnAdd() .HasColumnType("smallint") .HasColumnName("age_upper_limit") - .HasDefaultValueSql("200"); + .HasDefaultValueSql("200") + .HasComment("年龄上限"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") @@ -6400,12 +6664,14 @@ namespace Shentun.Peis.Migrations b.Property("CriticalRangeValue") .HasMaxLength(50) .HasColumnType("character varying(50)") - .HasColumnName("critical_range_value"); + .HasColumnName("critical_range_value") + .HasComment("危急值参考范围"); b.Property("ItemId") .HasColumnType("uuid") .HasColumnName("item_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("项目编号"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") @@ -6418,22 +6684,26 @@ namespace Shentun.Peis.Migrations b.Property("LowerDiagnosisId") .HasColumnType("uuid") .HasColumnName("lower_diagnosis_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("下限诊断"); b.Property("ReferenceRangeValue") .HasMaxLength(50) .HasColumnType("character varying(50)") - .HasColumnName("reference_range_value"); + .HasColumnName("reference_range_value") + .HasComment("参考范围"); b.Property("SexHormoneTermId") .HasColumnType("uuid") .HasColumnName("sex_hormone_term_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("性激素期限ID"); b.Property("UpperDiagnosisId") .HasColumnType("uuid") .HasColumnName("upper_diagnosis_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("上限诊断"); b.HasKey("Id"); @@ -6500,7 +6770,8 @@ namespace Shentun.Peis.Migrations b.Property("Content") .HasMaxLength(200) .HasColumnType("character varying(200)") - .HasColumnName("content"); + .HasColumnName("content") + .HasComment("短信内容"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") @@ -6512,12 +6783,14 @@ namespace Shentun.Peis.Migrations b.Property("FollowUpPlanId") .HasColumnType("uuid") - .HasColumnName("follow_up_plan_id"); + .HasColumnName("follow_up_plan_id") + .HasComment("随访计划ID"); b.Property("IsComplete") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("is_complete"); + .HasColumnName("is_complete") + .HasComment("是完成"); b.Property("LastModificationTime") .HasColumnType("timestamp without time zone") @@ -6530,25 +6803,32 @@ namespace Shentun.Peis.Migrations b.Property("MobileTelephone") .HasMaxLength(11) .HasColumnType("character varying(11)") - .HasColumnName("mobile_telephone"); + .HasColumnName("mobile_telephone") + .HasComment("手机号"); b.Property("PatientId") + .HasMaxLength(10) .HasColumnType("uuid") - .HasColumnName("patient_id"); + .HasColumnName("patient_id") + .HasComment("人员ID"); b.Property("PatientName") .HasMaxLength(16) .HasColumnType("character varying(16)") - .HasColumnName("patient_name"); + .HasColumnName("patient_name") + .HasComment("姓名"); b.Property("SmsTypeId") .HasColumnType("uuid") .HasColumnName("sms_type_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("短信类别ID"); b.HasKey("Id"); b.ToTable("sms_send"); + + b.HasComment("短信发送"); }); modelBuilder.Entity("Shentun.Peis.Models.SmsTemplate", b => @@ -6560,7 +6840,8 @@ namespace Shentun.Peis.Migrations b.Property("Content") .HasMaxLength(200) .HasColumnType("character varying(200)") - .HasColumnName("content"); + .HasColumnName("content") + .HasComment("短信内容"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") @@ -6595,11 +6876,14 @@ namespace Shentun.Peis.Migrations b.Property("SmsTypeId") .HasColumnType("uuid") .HasColumnName("sms_type_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("短信类别ID"); b.HasKey("Id"); b.ToTable("sms_template"); + + b.HasComment("短信模板"); }); modelBuilder.Entity("Shentun.Peis.Models.SmsType", b => @@ -6641,6 +6925,8 @@ namespace Shentun.Peis.Migrations b.HasKey("Id"); b.ToTable("sms_type"); + + b.HasComment("短信类别"); }); modelBuilder.Entity("Shentun.Peis.Models.Suggestion", b => @@ -6660,7 +6946,8 @@ namespace Shentun.Peis.Migrations b.Property("DiagnosisId") .HasColumnType("uuid") .HasColumnName("diagnosis_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("诊断ID"); b.Property("DisplayOrder") .HasColumnType("integer") @@ -6677,7 +6964,8 @@ namespace Shentun.Peis.Migrations b.Property("SuggestionContent") .HasMaxLength(200) .HasColumnType("character varying(200)") - .HasColumnName("suggestion_content"); + .HasColumnName("suggestion_content") + .HasComment("建议内容"); b.HasKey("Id"); @@ -6693,12 +6981,14 @@ namespace Shentun.Peis.Migrations { b.Property("PatientRegisterId") .HasColumnType("uuid") - .HasColumnName("patient_register_id"); + .HasColumnName("patient_register_id") + .HasComment("病人登记ID"); b.Property("DiagnosisId") .HasColumnType("uuid") .HasColumnName("diagnosis_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("诊断ID"); b.Property("DisplayOrder") .HasColumnType("integer") @@ -6706,7 +6996,8 @@ namespace Shentun.Peis.Migrations b.Property("SumSuggestionHeaderId") .HasColumnType("uuid") - .HasColumnName("sum_suggestion_header_id"); + .HasColumnName("sum_suggestion_header_id") + .HasComment("建议头ID"); b.HasKey("PatientRegisterId", "DiagnosisId") .HasName("pk_summary_diagnosis"); @@ -6757,7 +7048,8 @@ namespace Shentun.Peis.Migrations b.Property("TemplateContent") .HasMaxLength(200) .HasColumnType("character varying(200)") - .HasColumnName("template_content"); + .HasColumnName("template_content") + .HasComment("模板内容"); b.HasKey("Id"); @@ -6797,11 +7089,13 @@ namespace Shentun.Peis.Migrations b.Property("SuggestionContent") .HasMaxLength(100) .HasColumnType("character varying(100)") - .HasColumnName("suggestion_content"); + .HasColumnName("suggestion_content") + .HasComment("建议内容"); b.Property("SumSuggestionHeaderId") .HasColumnType("uuid") - .HasColumnName("sum_suggestion_header_id"); + .HasColumnName("sum_suggestion_header_id") + .HasComment("建议头ID"); b.HasKey("Id"); @@ -6839,17 +7133,20 @@ namespace Shentun.Peis.Migrations b.Property("PatientRegisterId") .HasColumnType("uuid") - .HasColumnName("patient_register_id"); + .HasColumnName("patient_register_id") + .HasComment("病人登记ID"); b.Property("SuggestionFlag") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("suggestion_flag"); + .HasColumnName("suggestion_flag") + .HasComment("建议标志"); b.Property("SuggestionTitle") .HasMaxLength(100) .HasColumnType("character varying(100)") - .HasColumnName("suggestion_title"); + .HasColumnName("suggestion_title") + .HasComment("建议标题"); b.HasKey("Id"); @@ -6888,12 +7185,14 @@ namespace Shentun.Peis.Migrations b.Property("SumSummaryHeaderId") .HasColumnType("uuid") - .HasColumnName("sum_summary_header_id"); + .HasColumnName("sum_summary_header_id") + .HasComment("建议头ID"); b.Property("SummaryContent") .HasMaxLength(100) .HasColumnType("character varying(100)") - .HasColumnName("summary_content"); + .HasColumnName("summary_content") + .HasComment("建议内容"); b.HasKey("Id"); @@ -6931,17 +7230,20 @@ namespace Shentun.Peis.Migrations b.Property("PatientRegisterId") .HasColumnType("uuid") - .HasColumnName("patient_register_id"); + .HasColumnName("patient_register_id") + .HasComment("病人登记ID"); b.Property("SummaryFlag") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("summary_flag"); + .HasColumnName("summary_flag") + .HasComment("综述标志"); b.Property("SummaryTitle") .HasMaxLength(100) .HasColumnType("character varying(100)") - .HasColumnName("summary_title"); + .HasColumnName("summary_title") + .HasComment("综述标题"); b.HasKey("Id"); @@ -7042,6 +7344,8 @@ namespace Shentun.Peis.Migrations .IsUnique(); b.ToTable("sysdiagrams"); + + b.HasComment("不是本软件的表,估计是系统自动生成的"); }); modelBuilder.Entity("Shentun.Peis.Models.SysParm", b => @@ -7062,7 +7366,8 @@ namespace Shentun.Peis.Migrations b.Property("DisplayName") .HasMaxLength(20) .HasColumnType("character varying(20)") - .HasColumnName("display_name"); + .HasColumnName("display_name") + .HasComment("参数名"); b.Property("DisplayOrder") .HasColumnType("integer") @@ -7079,7 +7384,8 @@ namespace Shentun.Peis.Migrations b.Property("Remark") .HasMaxLength(100) .HasColumnType("character varying(100)") - .HasColumnName("remark"); + .HasColumnName("remark") + .HasComment("备注"); b.Property("SimpleCode") .HasMaxLength(20) @@ -7089,12 +7395,14 @@ namespace Shentun.Peis.Migrations b.Property("SysParmTypeId") .HasMaxLength(50) .HasColumnType("character varying(50)") - .HasColumnName("sys_parm_type_id"); + .HasColumnName("sys_parm_type_id") + .HasComment("参数类别ID"); b.Property("ValueType") .HasMaxLength(1) .HasColumnType("character(1)") - .HasColumnName("value_type"); + .HasColumnName("value_type") + .HasComment("结果类别"); b.HasKey("Id"); @@ -7140,7 +7448,8 @@ namespace Shentun.Peis.Migrations b.Property("ParentId") .HasMaxLength(50) .HasColumnType("character varying(50)") - .HasColumnName("parent_id"); + .HasColumnName("parent_id") + .HasComment("父ID"); b.Property("SimpleCode") .HasMaxLength(20) @@ -7159,12 +7468,14 @@ namespace Shentun.Peis.Migrations b.Property("SysParmId") .HasMaxLength(50) .HasColumnType("character varying(50)") - .HasColumnName("sys_parm_id"); + .HasColumnName("sys_parm_id") + .HasComment("参数ID"); b.Property("OrganizationUnitId") .HasColumnType("uuid") .HasColumnName("organization_unit_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("单位ID"); b.Property("CreationTime") .HasColumnType("timestamp without time zone") @@ -7185,12 +7496,14 @@ namespace Shentun.Peis.Migrations b.Property("ParmValue") .HasMaxLength(100) .HasColumnType("character varying(100)") - .HasColumnName("parm_value"); + .HasColumnName("parm_value") + .HasComment("参数值"); b.Property("Remark") .HasMaxLength(100) .HasColumnType("character varying(100)") - .HasColumnName("remark"); + .HasColumnName("remark") + .HasComment("备注"); b.HasKey("SysParmId", "OrganizationUnitId") .HasName("pk_sys_parm_value"); @@ -7210,7 +7523,8 @@ namespace Shentun.Peis.Migrations b.Property("ValueOption") .HasMaxLength(50) .HasColumnType("character varying(50)") - .HasColumnName("value_option"); + .HasColumnName("value_option") + .HasComment("可选项"); b.Property("DisplayOrder") .ValueGeneratedOnAdd() @@ -7221,7 +7535,8 @@ namespace Shentun.Peis.Migrations b.Property("ValueOptionName") .HasMaxLength(20) .HasColumnType("character varying(20)") - .HasColumnName("value_option_name"); + .HasColumnName("value_option_name") + .HasComment("可选项名"); b.HasKey("SysParmId", "ValueOption") .HasName("pk_sys_parm_value_option"); @@ -7440,6 +7755,8 @@ namespace Shentun.Peis.Migrations b.HasIndex("DepartmentId"); b.ToTable("users"); + + b.HasComment("用户表,废弃"); }); modelBuilder.Entity("Shentun.Peis.Models.UserDepartment", b => @@ -7460,7 +7777,7 @@ namespace Shentun.Peis.Migrations b.ToTable("user_department"); - b.HasComment("用户科室操作权限"); + b.HasComment("用户科室操作权限,废弃"); }); modelBuilder.Entity("Shentun.Peis.Models.UserGrouping", b => @@ -7479,6 +7796,8 @@ namespace Shentun.Peis.Migrations b.HasIndex("GroupingId"); b.ToTable("user_grouping"); + + b.HasComment("用户组权限-废弃"); }); modelBuilder.Entity("Shentun.Peis.Models.UserItemType", b => @@ -7490,7 +7809,8 @@ namespace Shentun.Peis.Migrations b.Property("ItemTypeId") .HasColumnType("uuid") .HasColumnName("item_type_id") - .IsFixedLength(); + .IsFixedLength() + .HasComment("项目类别ID"); b.HasKey("UserId", "ItemTypeId") .HasName("pk_user_item_type"); @@ -7537,6 +7857,8 @@ namespace Shentun.Peis.Migrations .HasName("pk_sys_function"); b.ToTable("user_rights"); + + b.HasComment("用户控件权限-废弃"); }); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>