diff --git a/src/Shentun.Peis.Application/DataMigrations/BaseDataHandleAppService.cs b/src/Shentun.Peis.Application/DataMigrations/BaseDataHandleAppService.cs index da7dbd44..1f842f95 100644 --- a/src/Shentun.Peis.Application/DataMigrations/BaseDataHandleAppService.cs +++ b/src/Shentun.Peis.Application/DataMigrations/BaseDataHandleAppService.cs @@ -4,6 +4,7 @@ using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore.Query; using Microsoft.Extensions.DependencyModel; +using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using NPOI.DDF; using Shentun.Peis.CustomerOrgs; @@ -21,12 +22,14 @@ using System.IO; using System.Linq; using System.Reflection; using System.Runtime.Loader; +using System.Threading; using System.Threading.Tasks; using TencentCloud.Sqlserver.V20180328.Models; using Volo.Abp; using Volo.Abp.Application.Services; using Volo.Abp.Domain.Repositories; using Volo.Abp.Identity; +using Volo.Abp.Uow; using Volo.Abp.Users; using Xceed.Document.NET; @@ -55,14 +58,18 @@ namespace Shentun.Peis.DataMigrations }); + ////默认指引类别ID + //private readonly Guid defaultGuidTypeId = Guid.Parse("3a120284-df18-7b36-4b12-0423a7d5c1c6"); + ////默认体检报告类别ID + //private readonly Guid defaultMedicalReportTypeId = Guid.Parse("3a120285-65dd-e7da-c923-6b503ab9e1d9"); //默认指引类别ID - private readonly Guid defaultGuidTypeId = Guid.Parse("3a120284-df18-7b36-4b12-0423a7d5c1c6"); + private readonly char defaultGuidTypeId = '0'; //默认体检报告类别ID - private readonly Guid defaultMedicalReportTypeId = Guid.Parse("3a120285-65dd-e7da-c923-6b503ab9e1d9"); + private readonly char defaultMedicalReportTypeId = '0'; //默认体检中心 private readonly Guid defaultMedicalCenterId = Guid.Parse("0de5b78a-731d-4f80-b262-655ebbf04581"); - + private readonly IUnitOfWorkManager _unitOfWorkManager; private readonly IRepository _deviceTypeRepository; private readonly IRepository _itemTypeRepository; private readonly ItemTypeManager _itemTypeManager; @@ -87,6 +94,14 @@ namespace Shentun.Peis.DataMigrations private readonly IRepository _customerOrgRepository; private readonly CustomerOrgManager _customerOrgManager; private readonly IRepository _customerOrgRegisterRepository; + private readonly IRepository _customerOrgGroupRepository; + private readonly IRepository _customerOrgGroupDetailRepository; + private readonly IRepository _patientRepository; + private readonly IRepository _nationRepository; + private readonly ILogger _logger; + + + private Dictionary veryPatientNo = new Dictionary(); public BaseDataHandleAppService( IRepository deviceTypeRepository, @@ -112,7 +127,13 @@ namespace Shentun.Peis.DataMigrations IRepository menuInfoRepository, IRepository customerOrgRepository, CustomerOrgManager customerOrgManager, - IRepository customerOrgRegisterRepository) + IRepository customerOrgRegisterRepository, + IRepository customerOrgGroupRepository, + IRepository customerOrgGroupDetailRepository, + IRepository nationRepository, + IRepository patientRepository, + IUnitOfWorkManager unitOfWorkManager, + ILogger logger) { _deviceTypeRepository = deviceTypeRepository; _itemTypeRepository = itemTypeRepository; @@ -138,6 +159,12 @@ namespace Shentun.Peis.DataMigrations _customerOrgRepository = customerOrgRepository; _customerOrgManager = customerOrgManager; _customerOrgRegisterRepository = customerOrgRegisterRepository; + _customerOrgGroupRepository = customerOrgGroupRepository; + _customerOrgGroupDetailRepository = customerOrgGroupDetailRepository; + _nationRepository = nationRepository; + _patientRepository = patientRepository; + _unitOfWorkManager = unitOfWorkManager; + _logger = logger; } @@ -1580,6 +1607,228 @@ namespace Shentun.Peis.DataMigrations } } + /// + /// 迁移单位分组 + /// + /// + public async Task TransferCustomerOrgGroupData() + { + var count = await _customerOrgGroupRepository.GetCountAsync(); + if (count == 0) + { + List dataList = new List(); + + var oldCustomerOrgGroupList = await Db.Ado.GetDataTableAsync("select * from org_group order by display_order asc"); + if (oldCustomerOrgGroupList.Rows.Count > 0) + { + List fieldComparisons = new List(); + List fieldComparisonList = await _fieldComparisonRepository.GetListAsync(m => m.TableName == "customer_org"); + List customerOrgRegisterList = await _customerOrgRegisterRepository.GetListAsync(); + + foreach (DataRow row in oldCustomerOrgGroupList.Rows) + { + //新系统单位ID + Guid customerOrgId = Guid.Parse(fieldComparisonList.Where(m => m.OldKeyValue == row["org_id"].ToString()).FirstOrDefault().NewKeyValue); + Guid customerOrgRegisterId = customerOrgRegisterList.Where(m => m.CustomerOrgId == customerOrgId + && m.MedicalTimes == (short)Convert.ToInt32(row["org_medical_times"].ToString())).FirstOrDefault().Id; + Guid customerOrgGroupId = GuidGenerator.Create(); + + var data = new CustomerOrgGroup(customerOrgGroupId) + { + AgeLowerLimit = (short)Convert.ToInt32(row["age_lower_limit"].ToString()), + AgeUpperLimit = (short)Convert.ToInt32(row["age_upper_limit"].ToString()), + CustomerOrgRegisterId = customerOrgRegisterId, + DisplayName = row["org_group_name"].ToString(), + DisplayOrder = oldCustomerOrgGroupList.Rows.IndexOf(row) + 1, + ForSexId = ConvertForSex(row["for_sex_id"].ToString()), + JobPost = row["job_post"].ToString(), + JobTitle = row["job_title"].ToString(), + MaritalStatusId = Convert.ToChar(row["marital_status_id"].ToString()), + Price = Convert.ToDecimal(row["price"].ToString()), + Remark = row["remark"].ToString() + }; + + dataList.Add(data); + + fieldComparisons.Add(new FieldComparison + { + FieldName = "id", + NewKeyValue = customerOrgGroupId.ToString(), + OldKeyValue = row["org_group_id"].ToString(), + TableName = "customer_org_group" + }); + + + } + + if (dataList.Any()) + await _customerOrgGroupRepository.InsertManyAsync(dataList); + + if (fieldComparisons.Any()) + await _fieldComparisonRepository.InsertManyAsync(fieldComparisons); + + } + } + } + + + + /// + /// 迁移民族数据 民族对应 + /// + /// + public async Task TransferNationData() + { + var newNationList = await _nationRepository.GetListAsync(); + var oldNationList = await Db.Ado.GetDataTableAsync("select * from nation"); + + if (oldNationList.Rows.Count > 0) + { + List fieldComparisons = new List(); + + foreach (DataRow row in oldNationList.Rows) + { + string oldName = row["nation_name"].ToString(); //老系统名称 + var newNationEnt = newNationList.Where(m => m.DisplayName.Contains(oldName)).FirstOrDefault(); + if (newNationEnt != null) + { + fieldComparisons.Add(new FieldComparison + { + FieldName = "id", + NewKeyValue = newNationEnt.Id.ToString(), + OldKeyValue = row["nation_id"].ToString(), + TableName = "nation" + }); + } + + } + + + if (fieldComparisons.Any()) + await _fieldComparisonRepository.InsertManyAsync(fieldComparisons); + + } + } + + #region 人员登记 + + /// + /// 迁移档案数据 + /// + /// + public async Task TransferPatientData() + { + + + List dataList = new List(); + + + List oldPatientNos = (await _fieldComparisonRepository.GetQueryableAsync()).Where(m => m.TableName == "patient") + .Select(s => s.OldKeyValue).ToList(); + + + //var oldCustomerOrgGroupList = await Db.Ado.GetDataTableAsync("select top 200 * from patient_register where patient_id not in (@ids) order by patient_register_id asc", + // new { ids = oldPatientNos }); + + + var oldCustomerOrgGroupList = await Db.Ado.GetDataTableAsync("select top 500 patient_id,nation_id,address," + + "birth_date,name,email,id_card_no,marital_status_id,mobile_telephone,patient_password,postalcode,telephone,sex_id " + + "from patient_register where is_hand is null order by patient_register_id asc"); + + List tempPatientNos=new List(); + + if (oldCustomerOrgGroupList.Rows.Count > 0) + { + List fieldComparisons = new List(); + List fieldComparisonList = await _fieldComparisonRepository.GetListAsync(m => m.TableName == "nation"); + + foreach (DataRow row in oldCustomerOrgGroupList.Rows) + { + tempPatientNos.Add(row["patient_id"].ToString()); + if (!veryPatientNo.ContainsKey(row["patient_id"].ToString()) && !oldPatientNos.Contains(row["patient_id"].ToString())) + { + string nationId = null; + if (!string.IsNullOrWhiteSpace(row["nation_id"].ToString())) + { + nationId = fieldComparisonList.Where(m => m.OldKeyValue == row["nation_id"].ToString()).FirstOrDefault().NewKeyValue; + } + + Guid PatientId = GuidGenerator.Create(); //档案ID + + var data = new Patient(PatientId) + { + Address = row["address"].ToString(), + BirthDate = string.IsNullOrEmpty(row["birth_date"].ToString()) ? null : Convert.ToDateTime(row["birth_date"].ToString()), + BirthPlaceId = null, + DisplayName = row["name"].ToString(), + Email = row["email"].ToString(), + IdNo = row["id_card_no"].ToString(), + MaritalStatusId = Convert.ToChar(row["marital_status_id"].ToString()), + MedicalCenterId = defaultMedicalCenterId, + MobileTelephone = row["mobile_telephone"].ToString(), + NationId = nationId, + PatientNo = row["patient_id"].ToString(), + PatientPassword = row["patient_password"].ToString(), + PostalCode = row["postalcode"].ToString(), + SexId = ConvertSex(row["sex_id"].ToString()), + SimpleCode = LanguageConverter.GetPYSimpleCode(row["name"].ToString()), + Telephone = row["telephone"].ToString() + }; + + dataList.Add(data); + + fieldComparisons.Add(new FieldComparison + { + FieldName = "id", + NewKeyValue = PatientId.ToString(), + OldKeyValue = row["patient_id"].ToString(), + TableName = "patient" + }); + + #region 增加标识 + veryPatientNo.Add(row["patient_id"].ToString(), row["patient_id"].ToString()); + #endregion + } + + } + + if (dataList.Any()) + await _patientRepository.InsertManyAsync(dataList); + if (fieldComparisons.Any()) + await _fieldComparisonRepository.InsertManyAsync(fieldComparisons); + + + #region 修改状态 + + Thread.Sleep(100); + + await Db.Ado.ExecuteCommandAsync("update patient_register set is_hand='Y' where patient_id in (@ids) ", new { ids = tempPatientNos }); + + #endregion + _logger.LogInformation($"当前时间:{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")},迁移数据{dataList.Count}"); + + return true; + } + else + { + return false; + } + + + + + } + + //public async Task TransferPatientRegisterData() + //{ + + //} + + + + + #endregion + private void LoadDLL() { // 定义dll文件夹路径 @@ -1629,6 +1878,28 @@ namespace Shentun.Peis.DataMigrations return 'A'; } } + + /// + /// 转换老系统性别 + /// + /// + /// + private char ConvertSex(string SexId) + { + if (SexId == "0") + { + return 'M'; + } + else if (SexId == "1") + { + return 'F'; + } + else + { + return 'U'; + } + } + } diff --git a/src/Shentun.Peis.DbMigrator/appsettings.json b/src/Shentun.Peis.DbMigrator/appsettings.json index 6ea258d8..553c49ec 100644 --- a/src/Shentun.Peis.DbMigrator/appsettings.json +++ b/src/Shentun.Peis.DbMigrator/appsettings.json @@ -1,9 +1,9 @@ { "ConnectionStrings": { - "Default": "Host=140.143.162.39;Port=5432;Database=ShentunPeis070703;User ID=postgres;Password=shentun123;" + //"Default": "Host=140.143.162.39;Port=5432;Database=ShentunPeis070703;User ID=postgres;Password=shentun123;" //"Default": "Host=140.143.162.39;Port=5432;Database=ShentunPeisTemp;User ID=postgres;Password=shentun123;" //"Default": "Host=localhost;Port=5432;Database=ShentunPeis1218;User ID=postgres;Password=wxd123;" - //"Default": "Host=10.1.12.140;Port=5432;Database=ShentunPeis;User ID=postgres;Password=st123;" + "Default": "Host=10.1.12.140;Port=5432;Database=ShentunPeis;User ID=postgres;Password=st123;" }, "OpenIddict": { "Applications": { diff --git a/src/Shentun.Peis.Domain/CustomerOrgGroups/CustomerOrgGroup.cs b/src/Shentun.Peis.Domain/CustomerOrgGroups/CustomerOrgGroup.cs index f26a47b4..30e67a13 100644 --- a/src/Shentun.Peis.Domain/CustomerOrgGroups/CustomerOrgGroup.cs +++ b/src/Shentun.Peis.Domain/CustomerOrgGroups/CustomerOrgGroup.cs @@ -15,6 +15,9 @@ namespace Shentun.Peis.Models [Index(nameof(CustomerOrgRegisterId), Name = "fki_fk_customer_org_group_register")] public class CustomerOrgGroup : AuditedEntity, IDisplayName, IDisplayOrder, IHasConcurrencyStamp { + + public CustomerOrgGroup(Guid id) : base(id) { } + public CustomerOrgGroup() { CustomerOrgGroupDetails = new HashSet(); @@ -25,7 +28,7 @@ namespace Shentun.Peis.Models /// 分组名称 /// [Column("display_name")] - [StringLength(20)] + [StringLength(50)] public string DisplayName { get; set; } = null!; /// /// 价格 diff --git a/src/Shentun.Peis.Domain/Patients/Patient.cs b/src/Shentun.Peis.Domain/Patients/Patient.cs index aa8debf3..5e730fe7 100644 --- a/src/Shentun.Peis.Domain/Patients/Patient.cs +++ b/src/Shentun.Peis.Domain/Patients/Patient.cs @@ -106,7 +106,7 @@ namespace Shentun.Peis.Models /// 手机号 /// [Column("mobile_telephone")] - [StringLength(20)] + [StringLength(50)] public string? MobileTelephone { get; set; } /// /// 地址 diff --git a/src/Shentun.Peis.EntityFrameworkCore/Migrations/20240420050902_init20240420002.Designer.cs b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20240420050902_init20240420002.Designer.cs deleted file mode 100644 index ef92707e..00000000 --- a/src/Shentun.Peis.EntityFrameworkCore/Migrations/20240420050902_init20240420002.Designer.cs +++ /dev/null @@ -1,13768 +0,0 @@ -// -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("20240420050902_init20240420002")] - partial class init20240420002 - { - 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("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") - .HasColumnName("id"); - - 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("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("HelloTypeId") - .HasColumnType("text") - .HasColumnName("hello_type_id"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("S2") - .ValueGeneratedOnAdd() - .HasColumnType("character(1)") - .HasDefaultValueSql("'A'::bpchar"); - - b.HasKey("Id"); - - b.HasIndex(new[] { "AName" }, "ix_helloa") - .IsUnique(); - - b.ToTable("hello_a"); - }); - - modelBuilder.Entity("Shentun.Peis.Books.HelloType", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("TypeName") - .HasMaxLength(10) - .HasColumnType("character varying(10)") - .HasColumnName("type_name") - .HasComment("类型名称"); - - b.Property("s1") - .HasColumnType("uuid") - .HasColumnName("s1"); - - b.Property("s2") - .HasColumnType("uuid") - .HasColumnName("s2"); - - b.Property("s3") - .HasMaxLength(50) - .HasColumnType("character varying(50)") - .HasColumnName("s3"); - - b.HasKey("Id"); - - b.ToTable("hello_type"); - }); - - modelBuilder.Entity("Shentun.Peis.Books.Ma", b => - { - b.Property("Id") - .HasColumnType("text") - .HasColumnName("id"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.HasKey("Id"); - - b.ToTable("ma"); - }); - - modelBuilder.Entity("Shentun.Peis.Books.Mb", b => - { - b.Property("Id") - .HasColumnType("text") - .HasColumnName("id"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("MaId") - .HasColumnType("text") - .HasColumnName("ma_id"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.HasKey("Id"); - - b.HasIndex("MaId"); - - b.ToTable("mb"); - }); - - modelBuilder.Entity("Shentun.Peis.Books.Mc", b => - { - b.Property("Id") - .HasColumnType("text") - .HasColumnName("id"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("MbId") - .HasColumnType("text") - .HasColumnName("mb_id"); - - b.Property("Name") - .HasColumnType("text") - .HasColumnName("name"); - - b.HasKey("Id"); - - b.HasIndex("MbId"); - - b.ToTable("mc"); - }); - - 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.Books.TestCT", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("LastModificationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("TName") - .HasColumnType("text") - .HasColumnName("t_name"); - - b.HasKey("Id"); - - b.ToTable("test_ct"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.AbpUserDepartment", b => - { - b.Property("UserId") - .HasColumnType("uuid") - .HasColumnName("user_id"); - - b.Property("OrganizationUnitId") - .HasColumnType("uuid") - .HasColumnName("organization_unit_id"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.HasKey("UserId", "OrganizationUnitId") - .HasName("pk_user_organizationunitid"); - - b.ToTable("abp_user_department"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.Asbitem", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id") - .IsFixedLength() - .HasComment("编号"); - - b.Property("ClinicalMeaning") - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("clinical_meaning") - .HasComment("临床意义"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DefaultResult") - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("default_result") - .HasComment("默认结果"); - - b.Property("DeviceTypeId") - .HasColumnType("uuid") - .HasColumnName("device_type_id") - .HasComment("仪器类别"); - - b.Property("DiagnosisFunction") - .HasMaxLength(4000) - .HasColumnType("character varying(4000)") - .HasColumnName("diagnosis_function") - .HasComment("诊断函数"); - - b.Property("DisplayName") - .IsRequired() - .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'") - .HasComment("适用性别,M-男,F-女,A-全部"); - - b.Property("InvoiceItemTypeId") - .HasColumnType("uuid") - .HasColumnName("invoice_item_type_id") - .IsFixedLength() - .HasComment("发票类别"); - - b.Property("IsActive") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("is_active") - .HasDefaultValueSql("'Y'") - .HasComment("是启用"); - - b.Property("IsBeforeEat") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("is_before_eat") - .HasDefaultValueSql("'N'") - .HasComment("餐前项目"); - - b.Property("IsCheck") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("is_check") - .HasDefaultValueSql("'Y'") - .HasComment("是检查项目"); - - b.Property("IsContinueProcess") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("is_continue_process") - .HasDefaultValueSql("'N'") - .HasComment("诊断函数处理完毕后继续处理"); - - b.Property("IsDiagnosisFunction") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("is_diagnosis_function") - .HasDefaultValueSql("'N'") - .HasComment("启用诊断函数"); - - b.Property("IsItemResultMerger") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("is_item_result_merger") - .HasDefaultValueSql("'N'") - .HasComment("项目结果合并"); - - b.Property("IsPictureRotate") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("is_picture_rotate") - .HasDefaultValueSql("'N'") - .HasComment("体检报告图片旋转90°"); - - b.Property("ItemTypeId") - .HasColumnType("uuid") - .HasColumnName("item_type_id") - .IsFixedLength() - .HasComment("项目类别"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("Price") - .ValueGeneratedOnAdd() - .HasPrecision(8, 2) - .HasColumnType("numeric(8,2)") - .HasColumnName("price") - .HasDefaultValueSql("0") - .HasComment("价格"); - - b.Property("QueueTime") - .ValueGeneratedOnAdd() - .HasPrecision(3, 1) - .HasColumnType("numeric(3,1)") - .HasColumnName("queue_time") - .HasDefaultValueSql("0") - .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.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - 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") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("for_sex_id") - .HasDefaultValueSql("'A'") - .HasComment("适用性别ID"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("Guide") - .HasMaxLength(50) - .HasColumnType("character varying(50)") - .HasColumnName("guide") - .HasComment("指引单内容"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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") - .HasColumnName("id") - .IsFixedLength(); - - b.Property("Amount") - .IsRequired() - .ValueGeneratedOnAdd() - .HasColumnType("smallint") - .HasColumnName("amount") - .HasDefaultValueSql("0") - .HasComment("数量"); - - b.Property("AsbitemId") - .HasColumnType("uuid") - .HasColumnName("asbitem_id") - .IsFixedLength() - .HasComment("组合项目编号"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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") - .HasColumnName("id") - .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("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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") - .HasColumnName("id") - .IsFixedLength(); - - b.Property("BigtextResultTemplateId") - .HasColumnType("uuid") - .HasColumnName("bigtext_result_template_id") - .IsFixedLength(); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("Description") - .HasMaxLength(200) - .HasColumnType("character varying(200)") - .HasColumnName("description") - .HasComment("描述"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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") - .HasColumnName("id") - .IsFixedLength(); - - b.Property("BigtextResultTypeId") - .HasColumnType("uuid") - .HasColumnName("bigtext_result_type_id") - .IsFixedLength() - .HasComment("结果类别编号"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("character varying(50)") - .HasColumnName("display_name") - .HasComment("名称"); - - b.Property("DisplayOrder") - .HasColumnType("integer") - .HasColumnName("display_order"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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") - .HasColumnName("id") - .IsFixedLength(); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .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") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("ParentId") - .HasColumnType("uuid") - .HasColumnName("parent_id") - .IsFixedLength() - .HasComment("父编号"); - - b.Property("PathCode") - .IsRequired() - .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") - .HasColumnName("id") - .IsFixedLength(); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CountryCode") - .IsRequired() - .HasMaxLength(6) - .HasColumnType("character varying(6)") - .HasColumnName("country_code") - .HasComment("国家标准码"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .HasMaxLength(50) - .HasColumnType("character varying(50)") - .HasColumnName("display_name"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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") - .HasColumnName("id") - .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("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("PayModeId") - .IsRequired() - .HasMaxLength(4) - .HasColumnType("character varying(4)") - .HasColumnName("pay_mode_id") - .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") - .HasColumnName("id") - .HasComment("编号"); - - b.Property("CardBalance") - .HasPrecision(10, 2) - .HasColumnType("numeric(10,2)") - .HasColumnName("card_balance"); - - b.Property("CardNo") - .IsRequired() - .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("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - 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("timestamp without time zone") - .HasColumnName("expiry_date") - .HasComment("有效期"); - - b.Property("IdNo") - .IsRequired() - .HasMaxLength(18) - .HasColumnType("character varying(18)") - .HasColumnName("id_no") - .HasComment("身份证号"); - - b.Property("IsActive") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("is_active") - .HasDefaultValueSql("0") - .HasComment("使用标志"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("MedicalCenterId") - .HasColumnType("uuid") - .HasColumnName("medical_center_id"); - - b.Property("MobileTelephone") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("mobile_telephone") - .HasComment("手机"); - - 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(new[] { "CardNo", "IsActive" }, "ix_card_register") - .IsUnique(); - - b.ToTable("card_register"); - - b.HasComment("会员卡登记"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.CardType", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id") - .IsFixedLength() - .HasComment("编号"); - - b.Property("CardModeId") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("card_mode_id") - .HasDefaultValueSql("0") - .HasComment("卡模式"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("Discount") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("discount") - .HasDefaultValueSql("100") - .HasComment("折扣"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("display_name") - .HasComment("名称"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999") - .HasComment("显示顺序"); - - b.Property("ExpiryDay") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("expiry_day") - .HasDefaultValueSql("3650") - .HasComment("有效期"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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") - .HasColumnName("id") - .HasComment("收据号"); - - b.Property("ChargeFlag") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("charge_flag") - .HasDefaultValueSql("0"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - 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") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("PatientRegisterId") - .HasColumnType("uuid") - .HasColumnName("patient_register_id") - .HasComment("登记流水号"); - - b.Property("SettleAccountId") - .HasColumnType("uuid") - .HasColumnName("settle_account_id"); - - b.Property("SettleTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("settle_time"); - - 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") - .HasColumnName("id"); - - 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("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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") - .HasColumnName("id") - .HasComment("退费编号"); - - b.Property("ChargeId") - .HasColumnType("uuid") - .HasColumnName("charge_id") - .HasComment("收据号"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("SettleAccountId") - .HasColumnType("uuid") - .HasColumnName("settle_account_id") - .HasComment("结账ID"); - - b.Property("SettleTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("settle_time"); - - 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 varying(4)") - .HasColumnName("pay_mode_id") - .HasComment("支付方式ID"); - - b.Property("BackMoeny") - .HasPrecision(10, 2) - .HasColumnType("numeric(10,2)") - .HasColumnName("back_moeny") - .HasComment("退费金额"); - - b.Property("CardBillId") - .HasColumnType("uuid") - .HasColumnName("card_bill_id") - .HasComment("会员卡ID"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - 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") - .HasMaxLength(4) - .HasColumnType("character varying(4)") - .HasColumnName("pay_mode_id") - .HasComment("支付方式"); - - b.Property("CardBillId") - .HasColumnType("uuid") - .HasColumnName("card_bill_id") - .HasComment("会员卡ID"); - - b.Property("ChargeMoney") - .HasPrecision(10, 2) - .HasColumnType("numeric(10,2)") - .HasColumnName("charge_money") - .HasComment("金额"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - 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") - .HasColumnName("id"); - - 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("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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.ColumnReference", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id") - .IsFixedLength() - .HasComment("编号"); - - b.Property("ColumnReferencePlugInsId") - .HasColumnType("uuid") - .HasColumnName("column_reference_plug_ins_id") - .HasComment("插件ID"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("character varying(30)") - .HasColumnName("display_name") - .HasComment("名称"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.HasKey("Id"); - - b.HasIndex("ColumnReferencePlugInsId"); - - b.ToTable("column_reference"); - - b.HasComment("字段对照主表"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.ColumnReferenceCode", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id") - .IsFixedLength() - .HasComment("编号"); - - b.Property("CodeValue") - .IsRequired() - .HasColumnType("text") - .HasColumnName("code_value") - .HasComment("本系统编码值"); - - b.Property("ColumnReferenceId") - .HasColumnType("uuid") - .HasColumnName("column_reference_id") - .HasComment("字段对照主表ID"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("FilterCodeValue") - .HasColumnType("text") - .HasColumnName("filter_code_value") - .HasComment("过滤编码值"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.HasKey("Id"); - - b.HasIndex("ColumnReferenceId"); - - b.ToTable("column_reference_code"); - - b.HasComment("字段对照本系统编码表"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.ColumnReferenceInterface", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id") - .IsFixedLength() - .HasComment("编号"); - - b.Property("ColumnReferenceCodeId") - .HasColumnType("uuid") - .HasColumnName("column_reference_code_id") - .HasComment("字段对照本系统编码表ID"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("InterfaceCodeValue") - .IsRequired() - .HasColumnType("text") - .HasColumnName("interface_code_value") - .HasComment("第三方系统编码值"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.HasKey("Id"); - - b.HasIndex("ColumnReferenceCodeId"); - - b.ToTable("column_reference_interface"); - - b.HasComment("字段对照第三方系统编码表"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.ColumnReferencePlugIns", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id") - .IsFixedLength() - .HasComment("编号"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("character varying(30)") - .HasColumnName("display_name") - .HasComment("名称"); - - b.Property("DllName") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("character varying(50)") - .HasColumnName("dll_name") - .HasComment("Dll名称"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("ParmValue") - .HasMaxLength(500) - .HasColumnType("character varying(500)") - .HasColumnName("parm_value") - .HasComment("配置参数"); - - b.HasKey("Id"); - - b.ToTable("column_reference_plug_ins"); - - b.HasComment("字段对照插件表"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.CommonChar", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id") - .IsFixedLength(); - - b.Property("CommonCharTypeId") - .HasColumnType("uuid") - .HasColumnName("common_char_type_id") - .IsFixedLength() - .HasComment("常用字符类别编号"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(1) - .HasColumnType("character varying(1)") - .HasColumnName("display_name") - .HasComment("名称"); - - b.Property("DisplayOrder") - .HasColumnType("integer") - .HasColumnName("display_order"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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") - .HasColumnName("id") - .IsFixedLength(); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("display_name") - .HasComment("名称"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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") - .HasColumnName("id"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("ContactMethodType") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("contact_method_type") - .HasDefaultValueSql("'M'::bpchar") - .HasComment("联系方式类别-比如0-手机、1-电子邮箱"); - - b.Property("ContactMethodValue") - .HasMaxLength(50) - .HasColumnType("character varying(50)") - .HasColumnName("contact_method_value") - .HasComment("联系方式,比如18911254911,839860190@qq.com"); - - b.Property("ContactPersonId") - .HasColumnType("uuid") - .HasColumnName("contact_person_id"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.HasKey("Id"); - - b.HasIndex("ContactPersonId"); - - b.ToTable("contact_method"); - - b.HasComment("联系方式新增量主键,更新映射关系"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.ContactPerson", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id") - .IsFixedLength(); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("CustomerOrgId") - .HasColumnType("uuid") - .HasColumnName("customer_org_id") - .IsFixedLength() - .HasComment("客户单位编号"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("display_name") - .HasComment("姓名"); - - b.Property("DisplayOrder") - .HasColumnType("integer") - .HasColumnName("display_order"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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") - .HasColumnName("id") - .IsFixedLength(); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("CriticalValueTypeId") - .HasColumnType("uuid") - .HasColumnName("critical_value_type_id") - .IsFixedLength() - .HasComment("危急值类别编号"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("display_name") - .HasComment("名称"); - - b.Property("DisplayOrder") - .HasColumnType("integer") - .HasColumnName("display_order"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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") - .HasColumnName("id") - .IsFixedLength(); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("display_name") - .HasComment("名称"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("ParentId") - .HasColumnType("uuid") - .HasColumnName("parent_id") - .IsFixedLength() - .HasComment("父编号"); - - b.Property("PathCode") - .IsRequired() - .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") - .HasColumnName("id") - .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("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("character varying(50)") - .HasColumnName("display_name") - .HasComment("单位名称"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999") - .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("IsActive") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("is_active") - .HasDefaultValueSql("'Y'") - .HasComment("状态"); - - b.Property("IsLock") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("is_lock") - .HasDefaultValueSql("'N'") - .HasComment("锁住"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("MedicalCenterId") - .HasColumnType("uuid") - .HasColumnName("medical_center_id") - .HasComment("体检中心ID"); - - b.Property("OrgTypeId") - .HasColumnType("uuid") - .HasColumnName("org_type_id") - .IsFixedLength() - .HasComment("单位性质"); - - b.Property("ParentId") - .HasColumnType("uuid") - .HasColumnName("parent_id") - .IsFixedLength() - .HasComment("父编号"); - - b.Property("PathCode") - .IsRequired() - .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") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("short_name") - .HasComment("简称"); - - b.Property("SimpleCode") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("character varying(50)") - .HasColumnName("simple_code") - .HasComment("拼音简码"); - - b.Property("Telephone") - .HasMaxLength(50) - .HasColumnType("character varying(50)") - .HasColumnName("telephone") - .HasComment("联系电话"); - - b.HasKey("Id"); - - b.HasIndex(new[] { "MedicalCenterId" }, "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") - .HasColumnName("id"); - - b.Property("ChargeFlag") - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("charge_flag") - .HasComment("收退费标志"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("CustomerOrgRegisterId") - .HasColumnType("uuid") - .HasColumnName("customer_org_register_id") - .HasComment("客户单位登记ID"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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") - .HasColumnName("id"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("CustomerOrgChargeId") - .HasColumnType("uuid") - .HasColumnName("customer_org_charge_id") - .HasComment("收费编号"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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 varying(4)") - .HasColumnName("pay_mode_id") - .HasComment("支付方式"); - - b.Property("BackMoeny") - .HasPrecision(10, 2) - .HasColumnType("numeric(10,2)") - .HasColumnName("back_moeny") - .HasComment("退费金额"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - 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") - .HasColumnName("id"); - - b.Property("ChargeMoney") - .HasPrecision(10, 2) - .HasColumnType("numeric(10,2)") - .HasColumnName("charge_money") - .HasComment("支付金额"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("PayModeId") - .IsRequired() - .HasMaxLength(4) - .HasColumnType("character varying(4)") - .HasColumnName("pay_mode_id") - .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") - .HasColumnName("id") - .IsFixedLength() - .HasComment("分组编号"); - - b.Property("AgeLowerLimit") - .ValueGeneratedOnAdd() - .HasColumnType("smallint") - .HasColumnName("age_lower_limit") - .HasDefaultValueSql("0") - .HasComment("适用年龄下限"); - - b.Property("AgeUpperLimit") - .ValueGeneratedOnAdd() - .HasColumnType("smallint") - .HasColumnName("age_upper_limit") - .HasDefaultValueSql("200") - .HasComment("适用年龄上限"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("CustomerOrgRegisterId") - .HasColumnType("uuid") - .HasColumnName("customer_org_register_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("display_name") - .HasComment("分组名称"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999") - .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") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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("Amount") - .ValueGeneratedOnAdd() - .HasColumnType("smallint") - .HasColumnName("amount") - .HasDefaultValueSql("1") - .HasComment("数量"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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") - .HasColumnName("id"); - - b.Property("BeginTime") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp without time zone") - .HasColumnName("begin_time") - .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)") - .HasComment("开始日期"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("CustomerOrgId") - .HasColumnType("uuid") - .HasColumnName("customer_org_id") - .IsFixedLength() - .HasComment("单位编号"); - - b.Property("EndTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("end_time") - .HasComment("结束日期"); - - b.Property("IsComplete") - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("is_complete") - .HasComment("完成标志"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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") - .HasColumnName("id") - .IsFixedLength(); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("display_name") - .HasComment("名称"); - - b.Property("DisplayOrder") - .HasColumnType("integer") - .HasColumnName("display_order"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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") - .HasColumnName("id") - .IsFixedLength(); - - b.Property("CodePrefix") - .HasMaxLength(2) - .HasColumnType("character varying(2)") - .HasColumnName("code_prefix"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - 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") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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") - .HasColumnName("id") - .IsFixedLength() - .HasComment("仪器类别编号"); - - b.Property("CheckTypeFlag") - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("check_type_flag"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("display_name") - .HasComment("仪器类别名称"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999") - .HasComment("显示顺序"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("SimpleCode") - .IsRequired() - .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") - .HasColumnName("id") - .IsFixedLength(); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DiagnosisLevelId") - .HasColumnType("smallint") - .HasColumnName("diagnosis_level_id") - .HasComment("诊断级别"); - - b.Property("DisplayName") - .IsRequired() - .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'") - .HasComment("适用性别"); - - b.Property("IsIll") - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("is_ill") - .HasComment("是疾病"); - - b.Property("IsSummaryTemplate") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("is_summary_template") - .HasDefaultValueSql("'N'") - .HasComment("是总检模板"); - - b.Property("ItemTypeId") - .HasColumnType("uuid") - .HasColumnName("item_type_id") - .IsFixedLength() - .HasComment("项目类别"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("SimpleCode") - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("simple_code"); - - b.Property("SuggestionName") - .IsRequired() - .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("smallint") - .HasColumnName("id"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .HasMaxLength(10) - .HasColumnType("character varying(10)") - .HasColumnName("display_name"); - - b.Property("DisplayOrder") - .HasColumnType("integer") - .HasColumnName("display_order"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.HasKey("Id"); - - b.ToTable("diagnosis_level"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.DiagnosisPostfix", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id") - .IsFixedLength(); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("display_name") - .HasComment("名称"); - - b.Property("DisplayOrder") - .HasColumnType("integer") - .HasColumnName("display_order"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("SimpleCode") - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("simple_code"); - - 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") - .HasColumnName("id") - .IsFixedLength(); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("display_name") - .HasComment("名称"); - - b.Property("DisplayOrder") - .HasColumnType("integer") - .HasColumnName("display_order"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - 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") - .HasColumnName("id") - .IsFixedLength(); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("display_name") - .HasComment("名称"); - - b.Property("DisplayOrder") - .HasColumnType("integer") - .HasColumnName("display_order"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("ParentId") - .HasColumnType("uuid") - .HasColumnName("parent_id") - .IsFixedLength() - .HasComment("父编号"); - - b.Property("PathCode") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("path_code") - .HasComment("路径编码"); - - b.HasKey("Id"); - - b.ToTable("diagnosis_type"); - - b.HasComment("诊断类别"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.FieldComparison", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("FieldName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("field_name") - .HasComment("字段名"); - - b.Property("NewKeyValue") - .IsRequired() - .HasColumnType("text") - .HasColumnName("new_key_value") - .HasComment("新系统主键值"); - - b.Property("OldKeyValue") - .IsRequired() - .HasColumnType("text") - .HasColumnName("old_key_value") - .HasComment("老系统主键值"); - - b.Property("TableName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("table_name") - .HasComment("表名"); - - b.HasKey("Id"); - - b.ToTable("field_comparison"); - - b.HasComment("字段对照"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.FollowUpMode", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id") - .IsFixedLength(); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("display_name") - .HasComment("名称"); - - b.Property("DisplayOrder") - .HasColumnType("smallint") - .HasColumnName("display_order"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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") - .HasColumnName("id"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("character varying(200)") - .HasColumnName("content") - .HasComment("随访内容"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - 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") - .IsRequired() - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("is_loop") - .HasDefaultValueSql("'N'") - .HasComment("是否循环"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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") - .HasColumnName("id") - .IsFixedLength(); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("display_name") - .HasComment("名称"); - - b.Property("DisplayOrder") - .HasColumnType("smallint") - .HasColumnName("display_order"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .HasMaxLength(10) - .HasColumnType("character varying(10)") - .HasColumnName("display_name"); - - b.Property("DisplayOrder") - .HasColumnType("integer") - .HasColumnName("display_order"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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") - .HasColumnName("id"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("display_name"); - - b.Property("DisplayOrder") - .HasColumnType("integer") - .HasColumnName("display_order"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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") - .HasColumnName("id") - .IsFixedLength(); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("display_name") - .HasComment("名称"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("SimpleCode") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("simple_code") - .HasComment("简码"); - - b.HasKey("Id"); - - b.ToTable("guide_type"); - - b.HasComment("指引类别"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.HealthCertificate", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id") - .HasComment("登记流水号"); - - b.Property("CertificateDate") - .HasColumnType("date") - .HasColumnName("certificate_date") - .HasComment("发证日期"); - - b.Property("CertificateNo") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("certificate_no") - .HasComment("证件编号"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("ServiceOrg") - .HasMaxLength(50) - .HasColumnType("character varying(50)") - .HasColumnName("service_org") - .HasComment("服务单位"); - - b.Property("ServiceTradesId") - .IsRequired() - .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("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - 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") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("character varying(50)") - .HasColumnName("asbitem_names") - .HasComment("组合项目名称"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - 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("CheckRequestNo") - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("check_request_no"); - - b.Property("AsbitemNames") - .IsRequired() - .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("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - 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") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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("CheckRequestNo"); - - 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") - .HasColumnName("id") - .IsFixedLength(); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("display_name") - .HasComment("名称"); - - b.Property("DisplayOrder") - .HasColumnType("integer") - .HasColumnName("display_order"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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") - .HasColumnName("id"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("character varying(50)") - .HasColumnName("display_name") - .HasComment("名称"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("SimpleCode") - .IsRequired() - .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") - .HasColumnName("id") - .IsFixedLength(); - - b.Property("CalculationFunction") - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("calculation_function") - .HasComment("计算函数"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DefaultResult") - .HasMaxLength(200) - .HasColumnType("character varying(200)") - .HasColumnName("default_result") - .HasComment("默认结果"); - - b.Property("DeviceTypeId") - .HasColumnType("uuid") - .HasColumnName("device_type_id"); - - b.Property("DiagnosisFunction") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)") - .HasColumnName("diagnosis_function") - .HasComment("诊断函数"); - - b.Property("DisplayName") - .IsRequired() - .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") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("is_active") - .HasDefaultValueSql("'Y'") - .HasComment("启用"); - - b.Property("IsCalculationItem") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("is_calculation_item") - .HasDefaultValueSql("'N'") - .HasComment("是计算项目"); - - b.Property("IsContinueProcess") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("is_continue_process") - .HasDefaultValueSql("'Y'") - .HasComment("是继续处理"); - - b.Property("IsDiagnosisFunction") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("is_diagnosis_function") - .HasDefaultValueSql("'N'") - .HasComment("启用诊断函数"); - - b.Property("IsNameIntoSummary") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("is_name_into_summary") - .HasDefaultValueSql("'N'") - .HasComment("名称进入小结"); - - b.Property("IsProduceSummary") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("is_produce_summary") - .HasDefaultValueSql("'Y'") - .HasComment("是生成小结"); - - b.Property("ItemTypeId") - .HasColumnType("uuid") - .HasColumnName("item_type_id") - .IsFixedLength() - .HasComment("项目类别"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("LineModeFlag") - .ValueGeneratedOnAdd() - .HasColumnType("character(1)") - .HasDefaultValue('2') - .HasColumnName("line_mode_flag") - .HasComment("项目结果行模式"); - - b.Property("Price") - .ValueGeneratedOnAdd() - .HasPrecision(10, 2) - .HasColumnType("numeric(10,2)") - .HasColumnName("price") - .HasDefaultValueSql("0") - .HasComment("价格"); - - b.Property("PriceItemId") - .HasMaxLength(8) - .HasColumnType("uuid") - .HasColumnName("price_item_id") - .HasComment("价表项目编码"); - - b.Property("ReferenceRangeTypeFlag") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("reference_range_type_flag") - .HasDefaultValueSql("'0'::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") - .HasComment("单位"); - - b.HasKey("Id"); - - b.HasIndex("ItemTypeId"); - - b.HasIndex(new[] { "DisplayName", "ItemTypeId" }, "ix_item") - .IsUnique(); - - b.ToTable("item"); - - b.HasComment("项目设置"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.ItemDefaultResult", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id") - .IsFixedLength(); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("character varying(50)") - .HasColumnName("display_name") - .HasComment("名称"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("SimpleCode") - .IsRequired() - .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") - .HasColumnName("id") - .IsFixedLength() - .HasComment("结果匹配编号"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DiagnosisId") - .HasColumnType("uuid") - .HasColumnName("diagnosis_id") - .IsFixedLength() - .HasComment("诊断编号"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999") - .HasComment("显示顺序"); - - b.Property("ItemId") - .HasColumnType("uuid") - .HasColumnName("item_id") - .IsFixedLength() - .HasComment("项目编号"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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") - .HasColumnName("id") - .IsFixedLength() - .HasComment("结果模板编号"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DiagnosisId") - .HasColumnType("uuid") - .HasColumnName("diagnosis_id") - .HasComment("诊断编号"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999") - .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") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("Result") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("character varying(200)") - .HasColumnName("result") - .HasComment("结果"); - - b.Property("ResultStatusId") - .IsRequired() - .HasMaxLength(2) - .HasColumnType("character varying(2)") - .HasColumnName("result_status_id") - .HasComment("结果状态"); - - b.Property("SimpleCode") - .IsRequired() - .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") - .HasColumnName("id") - .IsFixedLength(); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("display_name"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999"); - - b.Property("ItemId") - .HasColumnType("uuid") - .HasColumnName("item_id") - .IsFixedLength(); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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") - .HasColumnName("id") - .IsFixedLength(); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("display_name"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("SimpleCode") - .IsRequired() - .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.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - 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") - .HasColumnName("id") - .IsFixedLength(); - - b.Property("CheckTypeFlag") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("check_type_flag") - .HasDefaultValueSql("'G'::bpchar") - .HasComment("检查类别,0-普通检查,1-检验,2-影像检查"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("display_name") - .HasComment("名称"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999"); - - b.Property("GuidTypeId") - .HasColumnType("uuid") - .HasColumnName("guid_type_id") - .IsFixedLength() - .HasComment("指引类别"); - - b.Property("IsMergeAsbitem") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("is_merge_asbitem") - .HasDefaultValueSql("'N'") - .HasComment("合并组合项目,Y-是,N-否"); - - b.Property("IsWrap") - .ValueGeneratedOnAdd() - .HasColumnType("character(1)") - .HasColumnName("is_wrap") - .HasDefaultValueSql("'N'") - .HasComment("项目结果是否可以换行"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("character varying(50)") - .HasColumnName("path_code") - .HasComment("路径编码"); - - b.Property("SimpleCode") - .IsRequired() - .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") - .HasColumnName("id"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("IsPrint") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("is_print") - .HasDefaultValueSql("'N'") - .HasComment("是否已打印"); - - b.Property("IsSignIn") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("is_sign_in") - .HasDefaultValueSql("'N'") - .HasComment("是签收"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("LisRequestNo") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("character varying(30)") - .HasColumnName("lis_request_no") - .HasComment("检验申请单号"); - - b.Property("SampleGroupId") - .HasColumnType("uuid") - .HasColumnName("sample_group_id") - .IsFixedLength() - .HasComment("条码分组ID"); - - b.Property("Sampler") - .HasMaxLength(16) - .HasColumnType("character varying(16)") - .HasColumnName("sampler") - .HasComment("采样人姓名"); - - b.Property("SamplingTime") - .HasColumnType("timestamp without time zone") - .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("timestamp without time zone") - .HasColumnName("sign_in_time") - .HasComment("签收时间"); - - b.HasKey("Id"); - - b.HasIndex("SampleGroupId"); - - 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("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("character varying(10)") - .HasColumnName("display_name") - .HasComment("婚姻状况名称"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999") - .HasComment("显示顺序"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("SimpleCode") - .IsRequired() - .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") - .HasColumnName("id") - .IsFixedLength() - .HasComment("体检结论编号"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("display_name") - .HasComment("体检结论名称"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999") - .HasComment("显示顺序"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("MedicalConclusionTypeId") - .IsRequired() - .HasMaxLength(2) - .HasColumnType("character(2)") - .HasColumnName("medical_conclusion_type_id") - .IsFixedLength(); - - b.Property("SimpleCode") - .IsRequired() - .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("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("display_name"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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") - .HasColumnName("id") - .IsFixedLength() - .HasComment("套餐主档编号"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("display_name") - .HasComment("名称"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999") - .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") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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() - .HasComment("套餐编号"); - - b.Property("AsbitemId") - .HasColumnType("uuid") - .HasColumnName("asbitem_id") - .IsFixedLength() - .HasComment("组合项目编号"); - - b.Property("Amount") - .HasColumnType("smallint") - .HasColumnName("amount"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("Price") - .HasPrecision(10, 2) - .HasColumnType("numeric(10,2)") - .HasColumnName("price"); - - 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") - .HasColumnName("id") - .IsFixedLength(); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("display_name") - .HasComment("名称"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("1") - .HasComment("显示顺序"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("SimpleCode") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("simple_code") - .HasComment("简码"); - - b.HasKey("Id"); - - b.ToTable("medical_report_type"); - - b.HasComment("体检报告类别设置"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.MedicalType", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id") - .IsFixedLength() - .HasComment("体检类别编号"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("character varying(50)") - .HasColumnName("display_name") - .HasComment("体检类别名称"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999") - .HasComment("显示顺序"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("SimpleCode") - .IsRequired() - .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.MenuInfo", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id") - .IsFixedLength(); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("display_name") - .HasComment("名称"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(999999) - .HasColumnName("display_order"); - - b.Property("IconName") - .HasMaxLength(50) - .HasColumnType("character varying(50)") - .HasColumnName("icon_name") - .HasComment("菜单图标"); - - b.Property("IsActive") - .ValueGeneratedOnAdd() - .HasColumnType("character(1)") - .HasColumnName("is_active") - .HasDefaultValueSql("'Y'") - .HasComment("是否启用"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("MenuType") - .ValueGeneratedOnAdd() - .HasColumnType("character(1)") - .HasDefaultValue('1') - .HasColumnName("menu_type"); - - b.Property("ParentId") - .HasColumnType("uuid") - .HasColumnName("parent_id") - .IsFixedLength() - .HasComment("父id"); - - b.Property("RouteUrl") - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("route_url") - .HasComment("路由地址"); - - b.Property("SimpleCode") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("simple_code") - .HasComment("自定义简码"); - - b.HasKey("Id"); - - b.HasIndex(new[] { "DisplayName", "ParentId" }, "ix_menu_info") - .IsUnique(); - - b.ToTable("menu_info"); - - b.HasComment("菜单设置"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.Nation", b => - { - b.Property("Id") - .HasMaxLength(3) - .HasColumnType("character(3)") - .HasColumnName("id") - .IsFixedLength() - .HasComment("编号"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CountryCode") - .HasMaxLength(2) - .HasColumnType("character varying(2)") - .HasColumnName("country_code"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("display_name") - .HasComment("名称"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999") - .HasComment("显示顺序"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("SimpleCode") - .IsRequired() - .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") - .HasColumnName("id") - .IsFixedLength() - .HasComment("职业病检查类别编号"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("display_name") - .HasComment("职业病检查类别名称"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999") - .HasComment("显示顺序"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("SimpleCode") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("simple_code") - .HasComment("显示顺序"); - - b.HasKey("Id"); - - b.ToTable("oc_check_type"); - - b.HasComment("职业病检查类别设置"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.OperateLog", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("ComputerName") - .HasMaxLength(50) - .HasColumnType("character varying(50)") - .HasColumnName("computer_name"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - 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") - .HasColumnName("id"); - - b.Property("Address") - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("address") - .HasComment("地址"); - - b.Property("BirthDate") - .HasColumnType("timestamp without time zone") - .HasColumnName("birth_date") - .HasComment("出生日期"); - - b.Property("BirthPlaceId") - .HasColumnType("uuid") - .HasColumnName("birth_place_id") - .IsFixedLength() - .HasComment("出生地"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .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") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("MaritalStatusId") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("marital_status_id") - .HasDefaultValueSql("'9'") - .HasComment("婚姻状况"); - - b.Property("MedicalCenterId") - .HasColumnType("uuid") - .HasColumnName("medical_center_id") - .HasComment("组织单位ID"); - - b.Property("MobileTelephone") - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("mobile_telephone") - .HasComment("手机号"); - - b.Property("NationId") - .HasColumnType("text") - .HasColumnName("nation_id") - .IsFixedLength() - .HasComment("民族编号"); - - b.Property("PatientNo") - .IsRequired() - .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") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("sex_id") - .HasDefaultValueSql("'U'") - .HasComment("性别"); - - b.Property("SimpleCode") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("character varying(30)") - .HasColumnName("simple_code") - .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") - .HasColumnName("id"); - - 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("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - 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") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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") - .HasColumnName("id"); - - b.Property("BeginDate") - .HasColumnType("date") - .HasColumnName("begin_date"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("EndDate") - .HasColumnType("date") - .HasColumnName("end_date"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - 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") - .HasColumnName("id") - .HasComment("登记流水号"); - - b.Property("Age") - .HasColumnType("smallint") - .HasColumnName("age") - .HasComment("年龄"); - - b.Property("AuditDate") - .HasColumnType("timestamp without time zone") - .HasColumnName("audit_date") - .HasComment("审核日期"); - - b.Property("AuditDoctorId") - .HasColumnType("uuid") - .HasColumnName("audit_doctor_id") - .HasComment("审核医生"); - - b.Property("BirthDate") - .HasColumnType("timestamp without time zone") - .HasColumnName("birth_date") - .HasComment("出生日期"); - - b.Property("CompleteFlag") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("complete_flag") - .HasDefaultValueSql("'0'::bpchar") - .HasComment("完成标志"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - 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") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasDefaultValue(new Guid("00000000-0000-0000-0000-000000000000")) - .HasColumnName("customer_org_register_id") - .HasComment("客户单位登记ID"); - - b.Property("GuidePrintTimes") - .ValueGeneratedOnAdd() - .HasColumnType("smallint") - .HasDefaultValue((short)0) - .HasColumnName("guide_print_times") - .HasComment("指引单打印次数"); - - b.Property("InterposeMeasure") - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("interpose_measure") - .HasComment("干预措施"); - - b.Property("IsAudit") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("is_audit") - .HasDefaultValueSql("'N'") - .HasComment("审核"); - - b.Property("IsLock") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("is_lock") - .HasDefaultValueSql("'N'") - .HasComment("锁住"); - - b.Property("IsMedicalStart") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("is_medical_start") - .HasDefaultValueSql("'N'") - .HasComment("体检开始标志"); - - b.Property("IsNameHide") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("is_name_hide") - .HasDefaultValueSql("'N'") - .HasComment("隐藏姓名"); - - b.Property("IsPhoneFollow") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("is_phone_follow") - .HasDefaultValueSql("'N'") - .HasComment("电话随访"); - - b.Property("IsRecoverGuide") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("is_recover_guide") - .HasDefaultValueSql("'N'") - .HasComment("指引单收回"); - - b.Property("IsUpload") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("is_upload") - .HasDefaultValueSql("'N'") - .HasComment("是否上传到WEB"); - - b.Property("IsVip") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("is_vip") - .HasDefaultValueSql("'N'") - .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") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("MaritalStatusId") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("marital_status_id") - .HasDefaultValueSql("'9'") - .HasComment("婚姻状况"); - - b.Property("MedicalCardNo") - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("medical_card_no") - .HasComment("体检卡号"); - - b.Property("MedicalCenterId") - .HasColumnType("uuid") - .HasColumnName("medical_center_id") - .HasComment("体检中心ID"); - - 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") - .IsRequired() - .ValueGeneratedOnAdd() - .HasColumnType("timestamp without time zone") - .HasColumnName("medical_start_date") - .HasDefaultValueSql("date(timezone('UTC-8'::text, now()))") - .HasComment("体检开始日期"); - - b.Property("MedicalTimes") - .HasColumnType("smallint") - .HasColumnName("medical_times") - .HasComment("体检次数"); - - b.Property("MedicalTypeId") - .HasColumnType("uuid") - .HasColumnName("medical_type_id") - .IsFixedLength() - .HasComment("体检类别"); - - b.Property("PatientId") - .HasColumnType("uuid") - .HasColumnName("patient_id") - .HasComment("档案号"); - - b.Property("PatientName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("patient_name") - .HasComment("姓名"); - - b.Property("PatientRegisterNo") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("character varying(30)") - .HasColumnName("patient_register_no") - .HasComment("条码号"); - - b.Property("PersonnelTypeId") - .HasColumnType("uuid") - .HasColumnName("personnel_type_id") - .IsFixedLength() - .HasComment("人员类别"); - - b.Property("Photo") - .HasMaxLength(200) - .HasColumnType("character varying(200)") - .HasColumnName("photo") - .HasComment("照片"); - - b.Property("Remark") - .HasMaxLength(50) - .HasColumnType("character varying(50)") - .HasColumnName("remark") - .HasComment("备注"); - - b.Property("ReportPrintTimes") - .ValueGeneratedOnAdd() - .HasColumnType("smallint") - .HasDefaultValue((short)0) - .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") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("sex_id") - .HasDefaultValueSql("'U'") - .HasComment("性别"); - - b.Property("SummaryDate") - .HasColumnType("timestamp without time zone") - .HasColumnName("summary_date") - .HasComment("总检日期"); - - b.Property("SummaryDoctorId") - .HasColumnType("uuid") - .HasColumnName("summary_doctor_id") - .HasComment("总检医生"); - - b.Property("ThirdInfo") - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("third_info") - .HasComment("附加第三方信息"); - - b.HasKey("Id"); - - b.HasIndex("MaritalStatusId"); - - b.HasIndex(new[] { "MedicalCenterId" }, "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("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - 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 varying(4)") - .HasColumnName("id") - .HasComment("编号,固定编码"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("display_name") - .HasComment("名称"); - - b.Property("DisplayOrder") - .HasColumnType("integer") - .HasColumnName("display_order"); - - b.Property("IsActive") - .ValueGeneratedOnAdd() - .HasColumnType("character(1)") - .HasDefaultValue('Y') - .HasColumnName("is_active"); - - b.Property("SimpleCode") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("simple_code") - .HasComment("简码"); - - 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") - .HasColumnName("id") - .IsFixedLength() - .HasComment("人员类别编号"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("character varying(50)") - .HasColumnName("display_name") - .HasComment("人员类别名称"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999") - .HasComment("显示顺序"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("SimpleCode") - .IsRequired() - .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") - .HasColumnName("id"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - 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") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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") - .HasColumnName("id") - .IsFixedLength() - .HasComment("毒害编号"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("display_name") - .HasComment("毒害名称"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999") - .HasComment("显示顺序"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("PoisonTypeId") - .HasColumnType("uuid") - .HasColumnName("poison_type_id") - .IsFixedLength(); - - b.Property("SimpleCode") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("simple_code") - .HasComment("简码"); - - b.HasKey("Id"); - - b.HasIndex("PoisonTypeId"); - - b.ToTable("poison"); - - b.HasComment("毒害因素设置"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.PoisonType", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id") - .IsFixedLength() - .HasComment("毒害类别编号"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("display_name") - .HasComment("毒害类别名称"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999") - .HasComment("显示顺序"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("SimpleCode") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("character varying(50)") - .HasColumnName("simple_code") - .HasComment("简码"); - - b.HasKey("Id"); - - b.ToTable("poison_type"); - - b.HasComment("毒害因素类别设置"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.PositionType", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id") - .IsFixedLength() - .HasComment("职务编号"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time") - .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("character varying(50)") - .HasColumnName("display_name") - .HasComment("职务名称"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999") - .HasComment("显示顺序"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time") - .HasComment("最后修改日期"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id") - .HasComment("最后修改者"); - - b.Property("SimpleCode") - .IsRequired() - .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") - .HasColumnName("id") - .IsFixedLength(); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .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") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("character varying(50)") - .HasColumnName("simple_code") - .HasComment("简码"); - - 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("PrimarykeyBuilderId") - .HasMaxLength(30) - .HasColumnType("character varying(30)") - .HasColumnName("primarykey_builder_id"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DateString") - .HasMaxLength(8) - .HasColumnType("character(8)") - .HasColumnName("date_string") - .IsFixedLength() - .HasComment("日期"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("SerialNo") - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("serial_no") - .HasComment("序列号"); - - b.HasKey("PrimarykeyBuilderId"); - - b.ToTable("primarykey_builder"); - - b.HasComment("主键产生器"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.QueueRegister", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id"); - - 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("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time") - .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayOrder") - .HasColumnType("integer") - .HasColumnName("display_order") - .HasComment("排队顺序"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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") - .HasColumnName("id") - .IsFixedLength() - .HasComment("参考范围编号"); - - b.Property("AgeLowerLimit") - .ValueGeneratedOnAdd() - .HasColumnType("smallint") - .HasColumnName("age_lower_limit") - .HasDefaultValueSql("0") - .HasComment("年龄下限"); - - b.Property("AgeUpperLimit") - .ValueGeneratedOnAdd() - .HasColumnType("smallint") - .HasColumnName("age_upper_limit") - .HasDefaultValueSql("200") - .HasComment("年龄上限"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - 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") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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.RegisterCheck", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id"); - - 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("timestamp without time zone") - .HasColumnName("check_date") - .HasComment("检查日期"); - - b.Property("CheckDoctorId") - .HasMaxLength(50) - .HasColumnType("character varying(50)") - .HasColumnName("check_doctor_id") - .HasComment("检查医生ID"); - - b.Property("CheckRequestNo") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("check_request_no") - .HasComment("检查单号"); - - b.Property("CheckRequestPrintTimes") - .ValueGeneratedOnAdd() - .HasColumnType("smallint") - .HasColumnName("check_request_print_times") - .HasDefaultValueSql("0") - .HasComment("检查申请单打印次数"); - - b.Property("CompleteFlag") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("complete_flag") - .HasDefaultValueSql("0") - .HasComment("完成标志"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("CriticalValue") - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("critical_value") - .HasComment("危急值"); - - b.Property("CriticalValueCreateDate") - .HasColumnType("timestamp without time zone") - .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("timestamp without time zone") - .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") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("is_lock") - .HasDefaultValueSql("'N'") - .HasComment("是否锁住"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("PatientRegisterId") - .HasColumnType("uuid") - .HasColumnName("patient_register_id"); - - 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.RegisterCheckAsbitem", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id") - .HasComment("主键"); - - b.Property("Amount") - .ValueGeneratedOnAdd() - .HasColumnType("smallint") - .HasColumnName("amount") - .HasDefaultValueSql("1") - .HasComment("数量"); - - b.Property("AsbitemId") - .HasMaxLength(6) - .HasColumnType("uuid") - .HasColumnName("asbitem_id") - .IsFixedLength() - .HasComment("组合项目"); - - b.Property("ChargePrice") - .HasPrecision(10, 2) - .HasColumnType("numeric(10,2)") - .HasColumnName("charge_price") - .HasComment("实收价格"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("GroupPackageId") - .HasColumnType("uuid") - .HasColumnName("group_package_id"); - - b.Property("IsCharge") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("is_charge") - .HasDefaultValueSql("'N'") - .HasComment("是否已收费"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("LisRequestId") - .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("RegisterCheckId") - .HasColumnType("uuid") - .HasColumnName("register_check_id"); - - b.Property("StandardPrice") - .HasPrecision(10, 2) - .HasColumnType("numeric(10,2)") - .HasColumnName("standard_price") - .HasComment("标准价格"); - - b.HasKey("Id"); - - b.HasIndex("AsbitemId"); - - b.HasIndex("RegisterCheckId"); - - b.HasIndex(new[] { "PatientRegisterId", "AsbitemId" }, "ix_register_asbitem") - .IsUnique(); - - b.ToTable("register_check_asbitem"); - - b.HasComment("检查组合项目记录"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.RegisterCheckCriticalValue", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - 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") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("is_complete") - .HasDefaultValueSql("'N'") - .HasComment("是否完成"); - - b.Property("ItemId") - .HasColumnType("uuid") - .HasColumnName("item_id") - .IsFixedLength() - .HasComment("项目编号"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("ProcessTypeFlag") - .IsRequired() - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasDefaultValue('0') - .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("timestamp without time zone") - .HasColumnName("check_date") - .HasComment("检查日期"); - - b.Property("CheckDoctorName") - .HasMaxLength(50) - .HasColumnType("character varying(50)") - .HasColumnName("check_doctor_name") - .HasComment("检查医生"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - 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("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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") - .HasColumnName("id") - .HasComment("检查图片编号"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("1") - .HasComment("显示顺序"); - - b.Property("IsPrint") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("is_print") - .HasDefaultValueSql("'N'") - .HasComment("打印标志"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("PictureFilename") - .IsRequired() - .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") - .HasColumnName("id"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999") - .HasComment("显示顺序"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("RegisterCheckId") - .HasColumnType("uuid") - .HasColumnName("register_check_id") - .HasComment("登记检查ID"); - - b.Property("Suggestion") - .IsRequired() - .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") - .HasColumnName("id"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999") - .HasComment("顺序"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("RegisterCheckId") - .HasColumnType("uuid") - .HasColumnName("register_check_id") - .HasComment("登记检查ID"); - - b.Property("Summary") - .IsRequired() - .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.Report", b => - { - b.Property("Id") - .HasMaxLength(16) - .HasColumnType("character varying(16)") - .HasColumnName("id") - .HasComment("主键Id"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time") - .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)") - .HasColumnName("display_name") - .HasComment("报表名称"); - - b.Property("IsActive") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasDefaultValue('N') - .HasColumnName("is_active") - .HasComment("启用标志(N:禁用,Y:启用)"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.HasKey("Id"); - - b.ToTable("report"); - - b.HasComment("自定义报表主表"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.ReportFormat", b => - { - b.Property("Id") - .HasMaxLength(16) - .HasColumnType("character varying(16)") - .HasColumnName("id") - .HasComment("主键Id"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time") - .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .HasMaxLength(64) - .HasColumnType("character varying(64)") - .HasColumnName("display_name") - .HasComment("格式名称"); - - b.Property("IsDefault") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasDefaultValue('N') - .HasColumnName("isDefault") - .HasComment("默认标志(N:不默认,Y:默认)"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("ReportId") - .HasMaxLength(16) - .HasColumnType("character varying(16)") - .HasColumnName("report_id") - .HasComment("报表ID"); - - b.HasKey("Id"); - - b.HasIndex("ReportId"); - - b.ToTable("report_format"); - - b.HasComment("自定义报表格式表"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.ReportFormatTemplate", b => - { - b.Property("Id") - .HasMaxLength(16) - .HasColumnType("character varying(16)") - .HasColumnName("id") - .HasComment("主键Id"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time") - .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DataSetJson") - .HasColumnType("text") - .HasColumnName("data_set_json") - .HasComment("模板文件"); - - b.Property("DisplayName") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("display_name") - .HasComment("模板名称"); - - b.Property("IsDefault") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasDefaultValue('N') - .HasColumnName("isDefault") - .HasComment("是否默认(N:不默认,Y:默认)"); - - b.Property("IsSystem") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasDefaultValue('N') - .HasColumnName("isSystem") - .HasComment("是否系统自定义(N:停用,Y:启用)"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("ReportFormatId") - .HasColumnType("character varying(16)") - .HasColumnName("report_format_id") - .HasComment("报表格式ID"); - - b.Property("TemplateFile") - .HasColumnType("text") - .HasColumnName("template_file") - .HasComment("模板文件"); - - b.Property("TemplateFileType") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("template_file_type") - .HasDefaultValueSql("1") - .HasComment("模板文件类型(0:FastReport,1:Grid++Report)"); - - b.HasKey("Id"); - - b.HasIndex("ReportFormatId"); - - b.ToTable("report_format_template"); - - b.HasComment("自定义报表格式模板表"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.ReportPrinter", b => - { - b.Property("Id") - .HasMaxLength(16) - .HasColumnType("character varying(16)") - .HasColumnName("id") - .HasComment("主键Id"); - - b.Property("ComputerName") - .HasMaxLength(64) - .HasColumnType("character varying(64)") - .HasColumnName("pc_name") - .HasComment("计算机名称"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time") - .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("PrinterName") - .HasMaxLength(64) - .HasColumnType("character varying(64)") - .HasColumnName("printer_name") - .HasComment("打印机名称"); - - b.Property("ReportId") - .HasColumnType("character varying(16)") - .HasColumnName("report_id") - .HasComment("报表ID"); - - b.HasKey("Id"); - - b.HasIndex("ReportId"); - - b.ToTable("report_printer"); - - b.HasComment("自定义报表客户端打印机设置表"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.ResultStatus", b => - { - b.Property("Id") - .HasMaxLength(2) - .HasColumnType("character varying(2)") - .HasColumnName("id"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_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") - .IsRequired() - .HasMaxLength(8) - .HasColumnType("character varying(8)") - .HasColumnName("data_input_prompt") - .HasComment("数据录入提示"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("display_name") - .HasComment("名称"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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") - .IsRequired() - .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") - .HasColumnName("id") - .IsFixedLength(); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - 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") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("OrganizationUnitId") - .HasColumnType("uuid") - .HasColumnName("department_id") - .IsFixedLength() - .HasComment(""); - - 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("ItemTypeId"); - - b.HasIndex("OrganizationUnitId"); - - b.HasIndex(new[] { "DisplayName" }, "ix_room") - .IsUnique(); - - b.ToTable("room"); - - b.HasComment("房间设置"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.SampleContainer", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id") - .IsFixedLength(); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("ContainerColor") - .HasColumnType("integer") - .HasColumnName("container_color") - .HasComment("颜色"); - - b.Property("ContainerColorName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("container_color_name") - .HasComment("颜色名"); - - b.Property("ContainerRemark") - .HasMaxLength(500) - .HasColumnType("character varying(500)") - .HasColumnName("container_remark"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("display_name") - .HasComment("名称"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999") - .HasComment("显示顺序"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("SimpleCode") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("simple_code") - .HasComment("简码"); - - 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") - .HasColumnName("id") - .IsFixedLength(); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("display_name") - .HasComment("名称"); - - b.Property("DisplayOrder") - .HasColumnType("integer") - .HasColumnName("display_order"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.HasKey("SampleGroupId", "AsbitemId") - .HasName("pk_sample_group_detail"); - - b.HasIndex("AsbitemId") - .IsUnique(); - - b.ToTable("sample_group_detail"); - - b.HasComment("标本分组包含组合项目设置"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.SampleType", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id") - .IsFixedLength(); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("display_name") - .HasComment("名称"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999") - .HasComment("显示顺序"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("SimpleCode") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("simple_code") - .HasComment("简码"); - - 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") - .HasColumnName("id") - .IsFixedLength() - .HasComment("编号"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("display_name") - .HasComment("名称"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999") - .HasComment("显示顺序"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("OrganizationUnitId") - .HasColumnType("uuid") - .HasColumnName("department_id") - .IsFixedLength(); - - b.Property("SimpleCode") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("simple_code") - .HasComment("简码"); - - 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[] { "OrganizationUnitId", "DisplayName" }, "ix_service_trades") - .IsUnique(); - - b.ToTable("service_trades"); - - b.HasComment("服务行业设置"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.SettleAccount", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id"); - - 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("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("IsComplete") - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("is_complete") - .HasComment("是完成"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("character varying(10)") - .HasColumnName("display_name") - .HasComment("名称"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999") - .HasComment("显示顺序"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("SimpleCode") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("character varying(10)") - .HasColumnName("simple_code") - .HasComment("简码"); - - b.HasKey("Id"); - - b.ToTable("sex"); - - b.HasComment("性别设置"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.SexHormoneReferenceRange", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id") - .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("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - 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") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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") - .HasColumnName("id") - .IsFixedLength(); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("display_name") - .HasComment("名称"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999") - .HasComment("显示顺序"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("SimpleCode") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("simple_code") - .HasComment("简码"); - - 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") - .HasColumnName("id"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("character varying(200)") - .HasColumnName("content") - .HasComment("短信内容"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("FollowUpPlanId") - .HasColumnType("uuid") - .HasColumnName("follow_up_plan_id") - .HasComment("随访计划ID"); - - b.Property("IsComplete") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("is_complete") - .HasDefaultValueSql("'N'") - .HasComment("是否完成"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("MobileTelephone") - .IsRequired() - .HasMaxLength(11) - .HasColumnType("character varying(11)") - .HasColumnName("mobile_telephone") - .HasComment("手机号"); - - b.Property("PatientId") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("uuid") - .HasColumnName("patient_id") - .HasComment("人员ID"); - - b.Property("PatientName") - .IsRequired() - .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") - .HasColumnName("id") - .IsFixedLength(); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("character varying(200)") - .HasColumnName("content") - .HasComment("短信内容"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("display_name") - .HasComment("名称"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("smallint") - .HasColumnName("display_order") - .HasDefaultValueSql("999999") - .HasComment("显示顺序"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("SimpleCode") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("simple_code") - .HasComment("简码"); - - 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") - .HasColumnName("id") - .IsFixedLength(); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("display_name") - .HasComment("名称"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("smallint") - .HasColumnName("display_order") - .HasDefaultValueSql("999999") - .HasComment("显示顺序"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("SimpleCode") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("simple_code") - .HasComment("简码"); - - b.HasKey("Id"); - - b.ToTable("sms_type"); - - b.HasComment("短信类别"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.Suggestion", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id") - .IsFixedLength(); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DiagnosisId") - .HasColumnType("uuid") - .HasColumnName("diagnosis_id") - .IsFixedLength() - .HasComment("诊断ID"); - - b.Property("DisplayOrder") - .HasColumnType("integer") - .HasColumnName("display_order"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("SuggestionContent") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("character varying(200)") - .HasColumnName("suggestion_content") - .HasComment("建议内容"); - - b.Property("SuggestionType") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("suggestion_type") - .HasDefaultValueSql("'0'::bpchar") - .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("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - 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") - .HasColumnName("id") - .IsFixedLength(); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("display_name") - .HasComment("名称"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999") - .HasComment("显示顺序"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("SimpleCode") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("simple_code") - .HasComment("简码"); - - b.Property("TemplateContent") - .IsRequired() - .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") - .HasColumnName("id"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayOrder") - .IsRequired() - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999") - .HasComment("显示顺序"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("SuggestionContent") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("suggestion_content") - .HasComment("建议内容"); - - b.Property("SuggestionType") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasColumnName("suggestion_type") - .HasDefaultValueSql("'0'::bpchar") - .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") - .HasColumnName("id"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayOrder") - .HasColumnType("integer") - .HasColumnName("display_order"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("PatientRegisterId") - .HasColumnType("uuid") - .HasColumnName("patient_register_id") - .HasComment("病人登记ID"); - - b.Property("SuggestionFlag") - .IsRequired() - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasDefaultValue('0') - .HasColumnName("suggestion_flag") - .HasComment("建议标志"); - - b.Property("SuggestionTitle") - .IsRequired() - .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") - .HasColumnName("id"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayOrder") - .HasColumnType("integer") - .HasColumnName("display_order"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("SumSummaryHeaderId") - .HasColumnType("uuid") - .HasColumnName("sum_summary_header_id") - .HasComment("建议头ID"); - - b.Property("SummaryContent") - .IsRequired() - .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") - .HasColumnName("id"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayOrder") - .HasColumnType("integer") - .HasColumnName("display_order"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("PatientRegisterId") - .HasColumnType("uuid") - .HasColumnName("patient_register_id") - .HasComment("病人登记ID"); - - b.Property("SummaryFlag") - .IsRequired() - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasDefaultValue('0') - .HasColumnName("summary_flag") - .HasComment("综述标志"); - - b.Property("SummaryTitle") - .IsRequired() - .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") - .HasColumnName("id") - .IsFixedLength() - .HasComment("症状编号"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("display_name") - .HasComment("名称"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999") - .HasComment("显示顺序"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("SimpleCode") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("simple_code") - .HasComment("简码"); - - b.HasKey("Id"); - - b.ToTable("symptom"); - - b.HasComment("症状"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.Sysdiagram", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("Definition") - .HasColumnType("bytea") - .HasColumnName("definition"); - - b.Property("DisplayName") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("display_name"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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(100) - .HasColumnType("character varying(100)") - .HasColumnName("id"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("display_name") - .HasComment("参数名"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999") - .HasComment("显示顺序"); - - b.Property("IsPublic") - .ValueGeneratedOnAdd() - .HasMaxLength(1) - .HasColumnType("character(1)") - .HasDefaultValue('N') - .HasColumnName("is_public") - .HasComment("是否支持设置按体检中心设置参数值(Y 直接取公共参数,无法设置 N.可以设置多个参数)"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("Remark") - .HasMaxLength(500) - .HasColumnType("character varying(500)") - .HasColumnName("remark") - .HasComment("备注"); - - b.Property("SimpleCode") - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("simple_code"); - - b.Property("SysParmTypeId") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .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(100) - .HasColumnType("character varying(100)") - .HasColumnName("id"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("display_name") - .HasComment("名称"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999") - .HasComment("显示顺序"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("ParentId") - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("parent_id") - .HasComment("父ID"); - - b.Property("SimpleCode") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("simple_code") - .HasComment("简码"); - - b.HasKey("Id"); - - b.ToTable("sys_parm_type"); - - b.HasComment("系统参数类别设置"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.SysParmValue", b => - { - b.Property("SysParmId") - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("sys_parm_id") - .HasComment("参数ID"); - - b.Property("MedicalCenterId") - .HasColumnType("uuid") - .HasColumnName("medical_center_id") - .IsFixedLength() - .HasComment("体检中心ID"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("ParmValue") - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("parm_value") - .HasComment("参数值"); - - b.Property("Remark") - .HasMaxLength(500) - .HasColumnType("character varying(500)") - .HasColumnName("remark") - .HasComment("备注"); - - b.HasKey("SysParmId", "MedicalCenterId") - .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("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - 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") - .HasColumnName("id") - .IsFixedLength() - .HasComment("职称类别编号"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("display_name") - .HasComment("名称"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999") - .HasComment("显示顺序"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("SimpleCode") - .IsRequired() - .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") - .HasColumnName("id") - .IsFixedLength(); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("display_name") - .HasComment("名称"); - - b.Property("DisplayOrder") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("display_order") - .HasDefaultValueSql("999999") - .HasComment("显示顺序"); - - b.Property("LastModificationTime") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("SimpleCode") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") - .HasColumnName("simple_code") - .HasComment("简码"); - - b.HasKey("Id"); - - b.ToTable("unit"); - - b.HasComment("单位设置"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.User", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Address") - .HasMaxLength(50) - .HasColumnType("character varying(50)") - .HasColumnName("address"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - 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") - .IsRequired() - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .IsRequired() - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - 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("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - 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("Shentun.Peis.RoleMenuInfos.RoleMenuInfo", b => - { - b.Property("RoleId") - .HasColumnType("uuid") - .HasColumnName("role_id") - .IsFixedLength(); - - b.Property("MenuInfoId") - .HasColumnType("uuid") - .HasColumnName("menu_info_id") - .IsFixedLength(); - - b.HasKey("RoleId", "MenuInfoId") - .HasName("pk_role_menuinfo"); - - b.ToTable("role_menu_info"); - - b.HasComment("角色对应菜单权限"); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("ApplicationName") - .HasMaxLength(96) - .HasColumnType("character varying(96)") - .HasColumnName("application_name"); - - b.Property("BrowserInfo") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("browser_info"); - - b.Property("ClientId") - .HasMaxLength(64) - .HasColumnType("character varying(64)") - .HasColumnName("client_id"); - - b.Property("ClientIpAddress") - .HasMaxLength(64) - .HasColumnType("character varying(64)") - .HasColumnName("client_ip_address"); - - b.Property("ClientName") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("client_name"); - - b.Property("Comments") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("comments"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CorrelationId") - .HasMaxLength(64) - .HasColumnType("character varying(64)") - .HasColumnName("correlation_id"); - - b.Property("Exceptions") - .HasColumnType("text") - .HasColumnName("exceptions"); - - b.Property("ExecutionDuration") - .HasColumnType("integer") - .HasColumnName("execution_duration"); - - b.Property("ExecutionTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("execution_time"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("extra_properties"); - - b.Property("HttpMethod") - .HasMaxLength(16) - .HasColumnType("character varying(16)") - .HasColumnName("http_method"); - - b.Property("HttpStatusCode") - .HasColumnType("integer") - .HasColumnName("http_status_code"); - - b.Property("ImpersonatorTenantId") - .HasColumnType("uuid") - .HasColumnName("impersonator_tenant_id"); - - b.Property("ImpersonatorTenantName") - .HasMaxLength(64) - .HasColumnType("character varying(64)") - .HasColumnName("impersonator_tenant_name"); - - b.Property("ImpersonatorUserId") - .HasColumnType("uuid") - .HasColumnName("impersonator_user_id"); - - b.Property("ImpersonatorUserName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("impersonator_user_name"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("tenant_id"); - - b.Property("TenantName") - .HasMaxLength(64) - .HasColumnType("character varying(64)") - .HasColumnName("tenant_name"); - - b.Property("Url") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("url"); - - b.Property("UserId") - .HasColumnType("uuid") - .HasColumnName("user_id"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("user_name"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "ExecutionTime"); - - b.HasIndex("TenantId", "UserId", "ExecutionTime"); - - b.ToTable("abp_audit_logs", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AuditLogId") - .HasColumnType("uuid") - .HasColumnName("audit_log_id"); - - b.Property("ExecutionDuration") - .HasColumnType("integer") - .HasColumnName("execution_duration"); - - b.Property("ExecutionTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("execution_time"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("extra_properties"); - - b.Property("MethodName") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("method_name"); - - b.Property("Parameters") - .HasMaxLength(2000) - .HasColumnType("character varying(2000)") - .HasColumnName("parameters"); - - b.Property("ServiceName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("service_name"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("tenant_id"); - - b.HasKey("Id"); - - b.HasIndex("AuditLogId"); - - b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); - - b.ToTable("abp_audit_log_actions", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AuditLogId") - .HasColumnType("uuid") - .HasColumnName("audit_log_id"); - - b.Property("ChangeTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("change_time"); - - b.Property("ChangeType") - .HasColumnType("smallint") - .HasColumnName("change_type"); - - b.Property("EntityId") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("entity_id"); - - b.Property("EntityTenantId") - .HasColumnType("uuid") - .HasColumnName("entity_tenant_id"); - - b.Property("EntityTypeFullName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("entity_type_full_name"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("extra_properties"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("tenant_id"); - - b.HasKey("Id"); - - b.HasIndex("AuditLogId"); - - b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); - - b.ToTable("abp_entity_changes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("EntityChangeId") - .HasColumnType("uuid") - .HasColumnName("entity_change_id"); - - b.Property("NewValue") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("new_value"); - - b.Property("OriginalValue") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("original_value"); - - b.Property("PropertyName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("property_name"); - - b.Property("PropertyTypeFullName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)") - .HasColumnName("property_type_full_name"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("tenant_id"); - - b.HasKey("Id"); - - b.HasIndex("EntityChangeId"); - - b.ToTable("abp_entity_property_changes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("extra_properties"); - - b.Property("IsAbandoned") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("is_abandoned"); - - b.Property("JobArgs") - .IsRequired() - .HasMaxLength(1048576) - .HasColumnType("character varying(1048576)") - .HasColumnName("job_args"); - - b.Property("JobName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("job_name"); - - b.Property("LastTryTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("last_try_time"); - - b.Property("NextTryTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("next_try_time"); - - b.Property("Priority") - .ValueGeneratedOnAdd() - .HasColumnType("smallint") - .HasDefaultValue((byte)15) - .HasColumnName("priority"); - - b.Property("TryCount") - .ValueGeneratedOnAdd() - .HasColumnType("smallint") - .HasDefaultValue((short)0) - .HasColumnName("try_count"); - - b.HasKey("Id"); - - b.HasIndex("IsAbandoned", "NextTryTime"); - - b.ToTable("abp_background_jobs", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("name"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("character varying(64)") - .HasColumnName("provider_key"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("character varying(64)") - .HasColumnName("provider_name"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("value"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("abp_feature_values", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("Description") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("description"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("extra_properties"); - - b.Property("IsStatic") - .HasColumnType("boolean") - .HasColumnName("is_static"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("name"); - - b.Property("Regex") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("regex"); - - b.Property("RegexDescription") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("regex_description"); - - b.Property("Required") - .HasColumnType("boolean") - .HasColumnName("required"); - - b.Property("ValueType") - .HasColumnType("integer") - .HasColumnName("value_type"); - - b.HasKey("Id"); - - b.ToTable("abp_claim_types", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("SourceTenantId") - .HasColumnType("uuid") - .HasColumnName("source_tenant_id"); - - b.Property("SourceUserId") - .HasColumnType("uuid") - .HasColumnName("source_user_id"); - - b.Property("TargetTenantId") - .HasColumnType("uuid") - .HasColumnName("target_tenant_id"); - - b.Property("TargetUserId") - .HasColumnType("uuid") - .HasColumnName("target_user_id"); - - b.HasKey("Id"); - - b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId") - .IsUnique(); - - b.ToTable("abp_link_users", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("extra_properties"); - - b.Property("IsDefault") - .HasColumnType("boolean") - .HasColumnName("is_default"); - - b.Property("IsPublic") - .HasColumnType("boolean") - .HasColumnName("is_public"); - - b.Property("IsStatic") - .HasColumnType("boolean") - .HasColumnName("is_static"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("name"); - - b.Property("NormalizedName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("normalized_name"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("tenant_id"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName"); - - b.ToTable("abp_roles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("claim_type"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("claim_value"); - - b.Property("RoleId") - .HasColumnType("uuid") - .HasColumnName("role_id"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("tenant_id"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("abp_role_claims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Action") - .HasMaxLength(96) - .HasColumnType("character varying(96)") - .HasColumnName("action"); - - b.Property("ApplicationName") - .HasMaxLength(96) - .HasColumnType("character varying(96)") - .HasColumnName("application_name"); - - b.Property("BrowserInfo") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("browser_info"); - - b.Property("ClientId") - .HasMaxLength(64) - .HasColumnType("character varying(64)") - .HasColumnName("client_id"); - - b.Property("ClientIpAddress") - .HasMaxLength(64) - .HasColumnType("character varying(64)") - .HasColumnName("client_ip_address"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CorrelationId") - .HasMaxLength(64) - .HasColumnType("character varying(64)") - .HasColumnName("correlation_id"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("extra_properties"); - - b.Property("Identity") - .HasMaxLength(96) - .HasColumnType("character varying(96)") - .HasColumnName("identity"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("tenant_id"); - - b.Property("TenantName") - .HasMaxLength(64) - .HasColumnType("character varying(64)") - .HasColumnName("tenant_name"); - - b.Property("UserId") - .HasColumnType("uuid") - .HasColumnName("user_id"); - - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("user_name"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Action"); - - b.HasIndex("TenantId", "ApplicationName"); - - b.HasIndex("TenantId", "Identity"); - - b.HasIndex("TenantId", "UserId"); - - b.ToTable("abp_security_logs", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccessFailedCount") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasDefaultValue(0) - .HasColumnName("access_failed_count"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DeleterId") - .HasColumnType("uuid") - .HasColumnName("deleter_id"); - - b.Property("DeletionTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("deletion_time"); - - b.Property("Email") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("email"); - - b.Property("EmailConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("email_confirmed"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("extra_properties"); - - b.Property("IsActive") - .HasColumnType("boolean") - .HasColumnName("is_active"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("is_deleted"); - - b.Property("IsExternal") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("is_external"); - - b.Property("LastModificationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("LockoutEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("lockout_enabled"); - - b.Property("LockoutEnd") - .HasColumnType("timestamp with time zone") - .HasColumnName("lockout_end"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("character varying(64)") - .HasColumnName("name"); - - b.Property("NormalizedEmail") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("normalized_email"); - - b.Property("NormalizedUserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("normalized_user_name"); - - b.Property("PasswordHash") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("password_hash"); - - b.Property("PhoneNumber") - .HasMaxLength(16) - .HasColumnType("character varying(16)") - .HasColumnName("phone_number"); - - b.Property("PhoneNumberConfirmed") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("phone_number_confirmed"); - - b.Property("SecurityStamp") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("security_stamp"); - - b.Property("Surname") - .HasMaxLength(64) - .HasColumnType("character varying(64)") - .HasColumnName("surname"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("tenant_id"); - - b.Property("TwoFactorEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("two_factor_enabled"); - - b.Property("UserName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("user_name"); - - b.HasKey("Id"); - - b.HasIndex("Email"); - - b.HasIndex("NormalizedEmail"); - - b.HasIndex("NormalizedUserName"); - - b.HasIndex("UserName"); - - b.ToTable("abp_users", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("ClaimType") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("claim_type"); - - b.Property("ClaimValue") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("claim_value"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("tenant_id"); - - b.Property("UserId") - .HasColumnType("uuid") - .HasColumnName("user_id"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("abp_user_claims", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => - { - b.Property("UserId") - .HasColumnType("uuid") - .HasColumnName("user_id"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("character varying(64)") - .HasColumnName("login_provider"); - - b.Property("ProviderDisplayName") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("provider_display_name"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(196) - .HasColumnType("character varying(196)") - .HasColumnName("provider_key"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("tenant_id"); - - b.HasKey("UserId", "LoginProvider"); - - b.HasIndex("LoginProvider", "ProviderKey"); - - b.ToTable("abp_user_logins", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("uuid") - .HasColumnName("organization_unit_id"); - - b.Property("UserId") - .HasColumnType("uuid") - .HasColumnName("user_id"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("tenant_id"); - - b.HasKey("OrganizationUnitId", "UserId"); - - b.HasIndex("UserId", "OrganizationUnitId"); - - b.ToTable("abp_user_organization_units", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("uuid") - .HasColumnName("user_id"); - - b.Property("RoleId") - .HasColumnType("uuid") - .HasColumnName("role_id"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("tenant_id"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId", "UserId"); - - b.ToTable("abp_user_role", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("uuid") - .HasColumnName("user_id"); - - b.Property("LoginProvider") - .HasMaxLength(64) - .HasColumnType("character varying(64)") - .HasColumnName("login_provider"); - - b.Property("Name") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("name"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("tenant_id"); - - b.Property("Value") - .HasColumnType("text") - .HasColumnName("value"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("abp_user_tokens", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(95) - .HasColumnType("character varying(95)") - .HasColumnName("code"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DeleterId") - .HasColumnType("uuid") - .HasColumnName("deleter_id"); - - b.Property("DeletionTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("deletion_time"); - - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("display_name"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("extra_properties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("is_deleted"); - - b.Property("IsPeis") - .HasMaxLength(1) - .HasColumnType("character varying(1)"); - - b.Property("LastModificationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("ParentId") - .HasColumnType("uuid") - .HasColumnName("parent_id"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("tenant_id"); - - b.HasKey("Id"); - - b.HasIndex("Code"); - - b.HasIndex("ParentId"); - - b.ToTable("abp_organization_units", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => - { - b.Property("OrganizationUnitId") - .HasColumnType("uuid") - .HasColumnName("organization_unit_id"); - - b.Property("RoleId") - .HasColumnType("uuid") - .HasColumnName("role_id"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("tenant_id"); - - b.HasKey("OrganizationUnitId", "RoleId"); - - b.HasIndex("RoleId", "OrganizationUnitId"); - - b.ToTable("abp_organization_unit_roles", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Applications.OpenIddictApplication", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("ClientId") - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("client_id"); - - b.Property("ClientSecret") - .HasColumnType("text") - .HasColumnName("client_secret"); - - b.Property("ClientUri") - .HasColumnType("text") - .HasColumnName("client_uri"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("ConsentType") - .HasMaxLength(50) - .HasColumnType("character varying(50)") - .HasColumnName("consent_type"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DeleterId") - .HasColumnType("uuid") - .HasColumnName("deleter_id"); - - b.Property("DeletionTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("deletion_time"); - - b.Property("DisplayName") - .HasColumnType("text") - .HasColumnName("display_name"); - - b.Property("DisplayNames") - .HasColumnType("text") - .HasColumnName("display_names"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("extra_properties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("is_deleted"); - - b.Property("LastModificationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("LogoUri") - .HasColumnType("text") - .HasColumnName("logo_uri"); - - b.Property("Permissions") - .HasColumnType("text") - .HasColumnName("permissions"); - - b.Property("PostLogoutRedirectUris") - .HasColumnType("text") - .HasColumnName("post_logout_redirect_uris"); - - b.Property("Properties") - .HasColumnType("text") - .HasColumnName("properties"); - - b.Property("RedirectUris") - .HasColumnType("text") - .HasColumnName("redirect_uris"); - - b.Property("Requirements") - .HasColumnType("text") - .HasColumnName("requirements"); - - b.Property("Type") - .HasMaxLength(50) - .HasColumnType("character varying(50)") - .HasColumnName("type"); - - b.HasKey("Id"); - - b.HasIndex("ClientId"); - - b.ToTable("open_iddict_applications", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Authorizations.OpenIddictAuthorization", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("ApplicationId") - .HasColumnType("uuid") - .HasColumnName("application_id"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationDate") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_date"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DeleterId") - .HasColumnType("uuid") - .HasColumnName("deleter_id"); - - b.Property("DeletionTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("deletion_time"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("extra_properties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("is_deleted"); - - b.Property("LastModificationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("Properties") - .HasColumnType("text") - .HasColumnName("properties"); - - b.Property("Scopes") - .HasColumnType("text") - .HasColumnName("scopes"); - - b.Property("Status") - .HasMaxLength(50) - .HasColumnType("character varying(50)") - .HasColumnName("status"); - - b.Property("Subject") - .HasMaxLength(400) - .HasColumnType("character varying(400)") - .HasColumnName("subject"); - - b.Property("Type") - .HasMaxLength(50) - .HasColumnType("character varying(50)") - .HasColumnName("type"); - - b.HasKey("Id"); - - b.HasIndex("ApplicationId", "Status", "Subject", "Type"); - - b.ToTable("open_iddict_authorizations", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Scopes.OpenIddictScope", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DeleterId") - .HasColumnType("uuid") - .HasColumnName("deleter_id"); - - b.Property("DeletionTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("deletion_time"); - - b.Property("Description") - .HasColumnType("text") - .HasColumnName("description"); - - b.Property("Descriptions") - .HasColumnType("text") - .HasColumnName("descriptions"); - - b.Property("DisplayName") - .HasColumnType("text") - .HasColumnName("display_name"); - - b.Property("DisplayNames") - .HasColumnType("text") - .HasColumnName("display_names"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("extra_properties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("is_deleted"); - - b.Property("LastModificationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("character varying(200)") - .HasColumnName("name"); - - b.Property("Properties") - .HasColumnType("text") - .HasColumnName("properties"); - - b.Property("Resources") - .HasColumnType("text") - .HasColumnName("resources"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("open_iddict_scopes", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.OpenIddict.Tokens.OpenIddictToken", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("ApplicationId") - .HasColumnType("uuid") - .HasColumnName("application_id"); - - b.Property("AuthorizationId") - .HasColumnType("uuid") - .HasColumnName("authorization_id"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationDate") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_date"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DeleterId") - .HasColumnType("uuid") - .HasColumnName("deleter_id"); - - b.Property("DeletionTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("deletion_time"); - - b.Property("ExpirationDate") - .HasColumnType("timestamp without time zone") - .HasColumnName("expiration_date"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("extra_properties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("is_deleted"); - - b.Property("LastModificationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("Payload") - .HasColumnType("text") - .HasColumnName("payload"); - - b.Property("Properties") - .HasColumnType("text") - .HasColumnName("properties"); - - b.Property("RedemptionDate") - .HasColumnType("timestamp without time zone") - .HasColumnName("redemption_date"); - - b.Property("ReferenceId") - .HasMaxLength(100) - .HasColumnType("character varying(100)") - .HasColumnName("reference_id"); - - b.Property("Status") - .HasMaxLength(50) - .HasColumnType("character varying(50)") - .HasColumnName("status"); - - b.Property("Subject") - .HasMaxLength(400) - .HasColumnType("character varying(400)") - .HasColumnName("subject"); - - b.Property("Type") - .HasMaxLength(50) - .HasColumnType("character varying(50)") - .HasColumnName("type"); - - b.HasKey("Id"); - - b.HasIndex("AuthorizationId"); - - b.HasIndex("ReferenceId"); - - b.HasIndex("ApplicationId", "Status", "Subject", "Type"); - - b.ToTable("open_iddict_tokens", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("name"); - - b.Property("ProviderKey") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)") - .HasColumnName("provider_key"); - - b.Property("ProviderName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)") - .HasColumnName("provider_name"); - - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("tenant_id"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("abp_permission_grants", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("name"); - - b.Property("ProviderKey") - .HasMaxLength(64) - .HasColumnType("character varying(64)") - .HasColumnName("provider_key"); - - b.Property("ProviderName") - .HasMaxLength(64) - .HasColumnType("character varying(64)") - .HasColumnName("provider_name"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(2048) - .HasColumnType("character varying(2048)") - .HasColumnName("value"); - - b.HasKey("Id"); - - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); - - b.ToTable("abp_settings", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => - { - b.Property("Id") - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("character varying(40)") - .HasColumnName("concurrency_stamp"); - - b.Property("CreationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("creation_time"); - - b.Property("CreatorId") - .HasColumnType("uuid") - .HasColumnName("creator_id"); - - b.Property("DeleterId") - .HasColumnType("uuid") - .HasColumnName("deleter_id"); - - b.Property("DeletionTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("deletion_time"); - - b.Property("ExtraProperties") - .HasColumnType("text") - .HasColumnName("extra_properties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(false) - .HasColumnName("is_deleted"); - - b.Property("LastModificationTime") - .HasColumnType("timestamp without time zone") - .HasColumnName("last_modification_time"); - - b.Property("LastModifierId") - .HasColumnType("uuid") - .HasColumnName("last_modifier_id"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("character varying(64)") - .HasColumnName("name"); - - b.HasKey("Id"); - - b.HasIndex("Name"); - - b.ToTable("abp_tenants", (string)null); - }); - - modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => - { - b.Property("TenantId") - .HasColumnType("uuid") - .HasColumnName("tenant_id"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("character varying(64)") - .HasColumnName("name"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("value"); - - b.HasKey("TenantId", "Name"); - - b.ToTable("abp_tenant_connection_strings", (string)null); - }); - - 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.Mb", b => - { - b.HasOne("Shentun.Peis.Books.Ma", "Ma") - .WithMany("Mbs") - .HasForeignKey("MaId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_mb_ma_1"); - - b.Navigation("Ma"); - }); - - modelBuilder.Entity("Shentun.Peis.Books.Mc", b => - { - b.HasOne("Shentun.Peis.Books.Mb", "Mb") - .WithMany("Mcs") - .HasForeignKey("MbId") - .HasConstraintName("fk_mc_mb_1"); - - b.Navigation("Mb"); - }); - - 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") - .IsRequired() - .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.Navigation("CardType"); - }); - - 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.ColumnReference", b => - { - b.HasOne("Shentun.Peis.Models.ColumnReferencePlugIns", "ColumnReferencePlugIns") - .WithMany("ColumnReferences") - .HasForeignKey("ColumnReferencePlugInsId") - .IsRequired() - .HasConstraintName("fk_columnreference_columnreferenceplugins"); - - b.Navigation("ColumnReferencePlugIns"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.ColumnReferenceCode", b => - { - b.HasOne("Shentun.Peis.Models.ColumnReference", "ColumnReference") - .WithMany("ColumnReferenceCodes") - .HasForeignKey("ColumnReferenceId") - .IsRequired() - .HasConstraintName("fk_columnreferencecode_columnreference"); - - b.Navigation("ColumnReference"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.ColumnReferenceInterface", b => - { - b.HasOne("Shentun.Peis.Models.ColumnReferenceCode", "ColumnReferenceCode") - .WithMany("ColumnReferenceInterfaces") - .HasForeignKey("ColumnReferenceCodeId") - .IsRequired() - .HasConstraintName("fk_columnreferenceinterface_columnreferencecode"); - - b.Navigation("ColumnReferenceCode"); - }); - - 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") - .IsRequired() - .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.SampleGroup", "SampleGroup") - .WithMany("LisRequests") - .HasForeignKey("SampleGroupId") - .IsRequired() - .HasConstraintName("fk_lis_request_sample_group"); - - b.Navigation("SampleGroup"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.MedicalConclusion", b => - { - b.HasOne("Shentun.Peis.Models.MedicalConclusionType", "MedicalConclusionType") - .WithMany("MedicalConclusions") - .HasForeignKey("MedicalConclusionTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .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.MaritalStatus", "MaritalStatus") - .WithMany("PatientRegisters") - .HasForeignKey("MaritalStatusId") - .IsRequired() - .HasConstraintName("fk_patient_register_marital_status_id"); - - b.HasOne("Shentun.Peis.Models.Patient", "Patient") - .WithMany("PatientRegisters") - .HasForeignKey("PatientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_patient_register_patient"); - - b.Navigation("MaritalStatus"); - - b.Navigation("Patient"); - }); - - 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.RegisterCheckAsbitem", b => - { - b.HasOne("Shentun.Peis.Models.Asbitem", "Asbitem") - .WithMany("RegisterCheckAsbitems") - .HasForeignKey("AsbitemId") - .IsRequired() - .HasConstraintName("fk_register_reference_asbitem"); - - b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister") - .WithMany("RegisterCheckAsbitems") - .HasForeignKey("PatientRegisterId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_register_reference_patient_"); - - b.HasOne("Shentun.Peis.Models.RegisterCheck", "RegisterCheck") - .WithMany("RegisterCheckAsbitems") - .HasForeignKey("RegisterCheckId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_registerasbitem_registercheck"); - - 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.ReportFormat", b => - { - b.HasOne("Shentun.Peis.Models.Report", "Report") - .WithMany("ReportFormats") - .HasForeignKey("ReportId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_reportformat_report_1"); - - b.Navigation("Report"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.ReportFormatTemplate", b => - { - b.HasOne("Shentun.Peis.Models.ReportFormat", "ReportFormat") - .WithMany("ReportFormatTemplates") - .HasForeignKey("ReportFormatId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_reportformattemplate_reportprinter_1"); - - b.Navigation("ReportFormat"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.ReportPrinter", b => - { - b.HasOne("Shentun.Peis.Models.Report", "Report") - .WithMany("ReportPrinters") - .HasForeignKey("ReportId") - .OnDelete(DeleteBehavior.Cascade) - .HasConstraintName("fk_reportprinter_report_1"); - - b.Navigation("Report"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.Room", b => - { - b.HasOne("Shentun.Peis.Models.ItemType", "ItemType") - .WithMany("Rooms") - .HasForeignKey("ItemTypeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_room_item_type"); - - b.HasOne("Shentun.Peis.Models.Department", "Department") - .WithMany("Rooms") - .HasForeignKey("OrganizationUnitId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_room_department"); - - 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("OrganizationUnitId") - .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") - .IsRequired() - .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.Ma", b => - { - b.Navigation("Mbs"); - }); - - modelBuilder.Entity("Shentun.Peis.Books.Mb", b => - { - b.Navigation("Mcs"); - }); - - 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("RegisterCheckAsbitems"); - - 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.ColumnReference", b => - { - b.Navigation("ColumnReferenceCodes"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.ColumnReferenceCode", b => - { - b.Navigation("ColumnReferenceInterfaces"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.ColumnReferencePlugIns", b => - { - b.Navigation("ColumnReferences"); - }); - - 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"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.Department", b => - { - 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.Patient", b => - { - b.Navigation("PatientRegisters"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.PatientRegister", b => - { - b.Navigation("Charges"); - - b.Navigation("HealthCertificate"); - - b.Navigation("PatientOccupationalDisease"); - - b.Navigation("PatientOccupationalHistories"); - - b.Navigation("PatientPoisons"); - - b.Navigation("PatientSymptoms"); - - b.Navigation("PhoneFollows"); - - b.Navigation("QueueRegisters"); - - b.Navigation("RegisterCheckAsbitems"); - - 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("RegisterCheckAsbitems"); - - b.Navigation("RegisterCheckItems"); - - b.Navigation("RegisterCheckPictures"); - - b.Navigation("RegisterCheckSuggestions"); - - b.Navigation("RegisterCheckSummaries"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.Report", b => - { - b.Navigation("ReportFormats"); - - b.Navigation("ReportPrinters"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.ReportFormat", b => - { - b.Navigation("ReportFormatTemplates"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.ResultStatus", b => - { - b.Navigation("RegisterCheckItems"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.SampleContainer", b => - { - b.Navigation("SampleGroups"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.SampleGroup", b => - { - b.Navigation("LisRequests"); - - b.Navigation("SampleGroupDetails"); - }); - - modelBuilder.Entity("Shentun.Peis.Models.SampleType", b => - { - 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/20240420050902_init20240420002.cs b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20240420050902_init20240420002.cs deleted file mode 100644 index a46d9efa..00000000 --- a/src/Shentun.Peis.EntityFrameworkCore/Migrations/20240420050902_init20240420002.cs +++ /dev/null @@ -1,136 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace Shentun.Peis.Migrations -{ - public partial class init20240420002 : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "column_reference_plug_ins", - columns: table => new - { - id = table.Column(type: "uuid", fixedLength: true, nullable: false, comment: "编号"), - display_name = table.Column(type: "character varying(30)", maxLength: 30, nullable: false, comment: "名称"), - dll_name = table.Column(type: "character varying(50)", maxLength: 50, nullable: false, comment: "Dll名称"), - parm_value = table.Column(type: "character varying(500)", maxLength: 500, nullable: true, comment: "配置参数"), - concurrency_stamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true), - creation_time = table.Column(type: "timestamp without time zone", nullable: false), - creator_id = table.Column(type: "uuid", nullable: false), - last_modification_time = table.Column(type: "timestamp without time zone", nullable: false), - last_modifier_id = table.Column(type: "uuid", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_column_reference_plug_ins", x => x.id); - }, - comment: "字段对照插件表"); - - migrationBuilder.CreateTable( - name: "column_reference", - columns: table => new - { - id = table.Column(type: "uuid", fixedLength: true, nullable: false, comment: "编号"), - display_name = table.Column(type: "character varying(30)", maxLength: 30, nullable: false, comment: "名称"), - column_reference_plug_ins_id = table.Column(type: "uuid", nullable: false, comment: "插件ID"), - concurrency_stamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true), - creation_time = table.Column(type: "timestamp without time zone", nullable: false), - creator_id = table.Column(type: "uuid", nullable: false), - last_modification_time = table.Column(type: "timestamp without time zone", nullable: false), - last_modifier_id = table.Column(type: "uuid", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_column_reference", x => x.id); - table.ForeignKey( - name: "fk_columnreference_columnreferenceplugins", - column: x => x.column_reference_plug_ins_id, - principalTable: "column_reference_plug_ins", - principalColumn: "id"); - }, - comment: "字段对照主表"); - - migrationBuilder.CreateTable( - name: "column_reference_code", - columns: table => new - { - id = table.Column(type: "uuid", fixedLength: true, nullable: false, comment: "编号"), - column_reference_id = table.Column(type: "uuid", nullable: false, comment: "字段对照主表ID"), - code_value = table.Column(type: "text", nullable: false, comment: "本系统编码值"), - filter_code_value = table.Column(type: "text", nullable: true, comment: "过滤编码值"), - concurrency_stamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true), - creation_time = table.Column(type: "timestamp without time zone", nullable: false), - creator_id = table.Column(type: "uuid", nullable: false), - last_modification_time = table.Column(type: "timestamp without time zone", nullable: false), - last_modifier_id = table.Column(type: "uuid", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_column_reference_code", x => x.id); - table.ForeignKey( - name: "fk_columnreferencecode_columnreference", - column: x => x.column_reference_id, - principalTable: "column_reference", - principalColumn: "id"); - }, - comment: "字段对照本系统编码表"); - - migrationBuilder.CreateTable( - name: "column_reference_interface", - columns: table => new - { - id = table.Column(type: "uuid", fixedLength: true, nullable: false, comment: "编号"), - column_reference_code_id = table.Column(type: "uuid", nullable: false, comment: "字段对照本系统编码表ID"), - interface_code_value = table.Column(type: "text", nullable: false, comment: "第三方系统编码值"), - concurrency_stamp = table.Column(type: "character varying(40)", maxLength: 40, nullable: true), - creation_time = table.Column(type: "timestamp without time zone", nullable: false), - creator_id = table.Column(type: "uuid", nullable: false), - last_modification_time = table.Column(type: "timestamp without time zone", nullable: false), - last_modifier_id = table.Column(type: "uuid", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_column_reference_interface", x => x.id); - table.ForeignKey( - name: "fk_columnreferenceinterface_columnreferencecode", - column: x => x.column_reference_code_id, - principalTable: "column_reference_code", - principalColumn: "id"); - }, - comment: "字段对照第三方系统编码表"); - - migrationBuilder.CreateIndex( - name: "IX_column_reference_column_reference_plug_ins_id", - table: "column_reference", - column: "column_reference_plug_ins_id"); - - migrationBuilder.CreateIndex( - name: "IX_column_reference_code_column_reference_id", - table: "column_reference_code", - column: "column_reference_id"); - - migrationBuilder.CreateIndex( - name: "IX_column_reference_interface_column_reference_code_id", - table: "column_reference_interface", - column: "column_reference_code_id"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "column_reference_interface"); - - migrationBuilder.DropTable( - name: "column_reference_code"); - - migrationBuilder.DropTable( - name: "column_reference"); - - migrationBuilder.DropTable( - name: "column_reference_plug_ins"); - } - } -} diff --git a/src/Shentun.Peis.EntityFrameworkCore/Migrations/20240420092428_init20240420003.cs b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20240420092428_init20240420003.cs deleted file mode 100644 index 363d1e21..00000000 --- a/src/Shentun.Peis.EntityFrameworkCore/Migrations/20240420092428_init20240420003.cs +++ /dev/null @@ -1,158 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace Shentun.Peis.Migrations -{ - public partial class init20240420003 : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "fk_lis_request_sample_group", - table: "lis_request"); - - migrationBuilder.DropForeignKey( - name: "fk_sample_", - table: "sample_group"); - - migrationBuilder.DropIndex( - name: "IX_lis_request_sample_group_id", - table: "lis_request"); - - migrationBuilder.DropColumn( - name: "sample_group_id", - table: "lis_request"); - - migrationBuilder.DropColumn( - name: "sampler", - table: "lis_request"); - - migrationBuilder.AddColumn( - name: "sample_container_id", - table: "lis_request", - type: "uuid", - nullable: false, - defaultValue: new Guid("00000000-0000-0000-0000-000000000000"), - comment: "标本容器编号"); - - migrationBuilder.AddColumn( - name: "sample_type_id", - table: "lis_request", - type: "uuid", - nullable: false, - defaultValue: new Guid("00000000-0000-0000-0000-000000000000"), - comment: "标本类型"); - - migrationBuilder.AddColumn( - name: "sampler_id", - table: "lis_request", - type: "uuid", - nullable: true, - comment: "采样人ID"); - - migrationBuilder.CreateIndex( - name: "IX_lis_request_sample_container_id", - table: "lis_request", - column: "sample_container_id"); - - migrationBuilder.CreateIndex( - name: "IX_lis_request_sample_type_id", - table: "lis_request", - column: "sample_type_id"); - - migrationBuilder.AddForeignKey( - name: "fk_lis_request_sample_container", - table: "lis_request", - column: "sample_container_id", - principalTable: "sample_container", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_lis_request_sample_type", - table: "lis_request", - column: "sample_type_id", - principalTable: "sample_type", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_sample_group_sample_container", - table: "sample_group", - column: "sample_container_id", - principalTable: "sample_container", - principalColumn: "id"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "fk_lis_request_sample_container", - table: "lis_request"); - - migrationBuilder.DropForeignKey( - name: "fk_lis_request_sample_type", - table: "lis_request"); - - migrationBuilder.DropForeignKey( - name: "fk_sample_group_sample_container", - table: "sample_group"); - - migrationBuilder.DropIndex( - name: "IX_lis_request_sample_container_id", - table: "lis_request"); - - migrationBuilder.DropIndex( - name: "IX_lis_request_sample_type_id", - table: "lis_request"); - - migrationBuilder.DropColumn( - name: "sample_container_id", - table: "lis_request"); - - migrationBuilder.DropColumn( - name: "sample_type_id", - table: "lis_request"); - - migrationBuilder.DropColumn( - name: "sampler_id", - table: "lis_request"); - - migrationBuilder.AddColumn( - name: "sample_group_id", - table: "lis_request", - type: "uuid", - fixedLength: true, - nullable: false, - defaultValue: new Guid("00000000-0000-0000-0000-000000000000"), - comment: "条码分组ID"); - - migrationBuilder.AddColumn( - name: "sampler", - table: "lis_request", - type: "character varying(16)", - maxLength: 16, - nullable: true, - comment: "采样人姓名"); - - migrationBuilder.CreateIndex( - name: "IX_lis_request_sample_group_id", - table: "lis_request", - column: "sample_group_id"); - - migrationBuilder.AddForeignKey( - name: "fk_lis_request_sample_group", - table: "lis_request", - column: "sample_group_id", - principalTable: "sample_group", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_sample_", - table: "sample_group", - column: "sample_container_id", - principalTable: "sample_container", - principalColumn: "id"); - } - } -} diff --git a/src/Shentun.Peis.EntityFrameworkCore/Migrations/20240420092428_init20240420003.Designer.cs b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20240421094110_init20240421001.Designer.cs similarity index 99% rename from src/Shentun.Peis.EntityFrameworkCore/Migrations/20240420092428_init20240420003.Designer.cs rename to src/Shentun.Peis.EntityFrameworkCore/Migrations/20240421094110_init20240421001.Designer.cs index 5de22534..38d616b6 100644 --- a/src/Shentun.Peis.EntityFrameworkCore/Migrations/20240420092428_init20240420003.Designer.cs +++ b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20240421094110_init20240421001.Designer.cs @@ -13,8 +13,8 @@ using Volo.Abp.EntityFrameworkCore; namespace Shentun.Peis.Migrations { [DbContext(typeof(PeisDbContext))] - [Migration("20240420092428_init20240420003")] - partial class init20240420003 + [Migration("20240421094110_init20240421001")] + partial class init20240421001 { protected override void BuildTargetModel(ModelBuilder modelBuilder) { @@ -2732,8 +2732,8 @@ namespace Shentun.Peis.Migrations b.Property("DisplayName") .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") + .HasMaxLength(50) + .HasColumnType("character varying(50)") .HasColumnName("display_name") .HasComment("分组名称"); diff --git a/src/Shentun.Peis.EntityFrameworkCore/Migrations/20240421094110_init20240421001.cs b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20240421094110_init20240421001.cs new file mode 100644 index 00000000..a9fd2633 --- /dev/null +++ b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20240421094110_init20240421001.cs @@ -0,0 +1,39 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Shentun.Peis.Migrations +{ + public partial class init20240421001 : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "display_name", + table: "customer_org_group", + type: "character varying(50)", + maxLength: 50, + nullable: false, + comment: "分组名称", + oldClrType: typeof(string), + oldType: "character varying(20)", + oldMaxLength: 20, + oldComment: "分组名称"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "display_name", + table: "customer_org_group", + type: "character varying(20)", + maxLength: 20, + nullable: false, + comment: "分组名称", + oldClrType: typeof(string), + oldType: "character varying(50)", + oldMaxLength: 50, + oldComment: "分组名称"); + } + } +} diff --git a/src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs b/src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs index 575b9ee3..85ec11d7 100644 --- a/src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs +++ b/src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs @@ -2730,8 +2730,8 @@ namespace Shentun.Peis.Migrations b.Property("DisplayName") .IsRequired() - .HasMaxLength(20) - .HasColumnType("character varying(20)") + .HasMaxLength(50) + .HasColumnType("character varying(50)") .HasColumnName("display_name") .HasComment("分组名称"); @@ -3864,11 +3864,14 @@ namespace Shentun.Peis.Migrations modelBuilder.Entity("Shentun.Peis.Models.GuideType", b => { - b.Property("Id") - .HasColumnType("uuid") + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("character(1)") .HasColumnName("id") .IsFixedLength(); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -4950,8 +4953,8 @@ namespace Shentun.Peis.Migrations .HasColumnName("display_order") .HasDefaultValueSql("999999"); - b.Property("GuidTypeId") - .HasColumnType("uuid") + b.Property("GuidTypeId") + .HasColumnType("character(1)") .HasColumnName("guid_type_id") .IsFixedLength() .HasComment("指引类别"); @@ -4981,8 +4984,8 @@ namespace Shentun.Peis.Migrations .HasColumnType("uuid") .HasColumnName("last_modifier_id"); - b.Property("MedicalReportTypeId") - .HasColumnType("uuid") + b.Property("MedicalReportTypeId") + .HasColumnType("character(1)") .HasColumnName("medical_report_type_id") .IsFixedLength() .HasComment("体检报告类别"); @@ -5445,11 +5448,14 @@ namespace Shentun.Peis.Migrations modelBuilder.Entity("Shentun.Peis.Models.MedicalReportType", b => { - b.Property("Id") - .HasColumnType("uuid") + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("character(1)") .HasColumnName("id") .IsFixedLength(); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -5988,8 +5994,8 @@ namespace Shentun.Peis.Migrations .HasComment("组织单位ID"); b.Property("MobileTelephone") - .HasMaxLength(20) - .HasColumnType("character varying(20)") + .HasMaxLength(50) + .HasColumnType("character varying(50)") .HasColumnName("mobile_telephone") .HasComment("手机号"); @@ -9463,8 +9469,7 @@ namespace Shentun.Peis.Migrations .HasColumnType("uuid") .HasColumnName("creator_id"); - b.Property("DisplayOrder") - .IsRequired() + b.Property("DisplayOrder") .ValueGeneratedOnAdd() .HasColumnType("integer") .HasColumnName("display_order") @@ -9597,7 +9602,7 @@ namespace Shentun.Peis.Migrations .HasColumnType("uuid") .HasColumnName("creator_id"); - b.Property("DisplayOrder") + b.Property("DisplayOrder") .HasColumnType("integer") .HasColumnName("display_order"); @@ -12578,7 +12583,7 @@ namespace Shentun.Peis.Migrations .WithMany("ItemTypes") .HasForeignKey("MedicalReportTypeId") .IsRequired() - .HasConstraintName("fk_item_ty"); + .HasConstraintName("fk_item_type_medical_report_type"); b.Navigation("GuidType"); diff --git a/test/Shentun.Peis.Application.Tests/ApiWorkTest.cs b/test/Shentun.Peis.Application.Tests/ApiWorkTest.cs index d1495b15..f7f0bf10 100644 --- a/test/Shentun.Peis.Application.Tests/ApiWorkTest.cs +++ b/test/Shentun.Peis.Application.Tests/ApiWorkTest.cs @@ -29,14 +29,14 @@ namespace Shentun.Peis } - [Fact] - //[UnitOfWork] - public async Task TestApi() - { - using (var aaa = _unitOfWorkManager.Begin(true, true)) - { - await _appService.TestApi(); - } - } + //[Fact] + ////[UnitOfWork] + //public async Task TestApi() + //{ + // using (var aaa = _unitOfWorkManager.Begin(true, true)) + // { + // await _appService.TestApi(); + // } + //} } } diff --git a/test/Shentun.Peis.Application.Tests/BaseDataHandleTest.cs b/test/Shentun.Peis.Application.Tests/BaseDataHandleTest.cs new file mode 100644 index 00000000..6be0ff3c --- /dev/null +++ b/test/Shentun.Peis.Application.Tests/BaseDataHandleTest.cs @@ -0,0 +1,58 @@ +using Shentun.Peis.CustomerOrgs; +using Shentun.Peis.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Repositories; +using Volo.Abp.Uow; +using Xunit.Abstractions; +using Xunit; +using Shentun.Peis.DataMigrations; + +namespace Shentun.Peis +{ + + + public class BaseDataHandleTest : PeisApplicationTestBase + { + + private readonly ITestOutputHelper _output; + private readonly IUnitOfWorkManager _unitOfWorkManager; + private readonly BaseDataHandleAppService _appService; + public BaseDataHandleTest(ITestOutputHelper testOutputHelper) + { + _output = testOutputHelper; + _unitOfWorkManager = GetRequiredService(); + _appService = GetRequiredService(); + } + + [Fact] + public async Task TransferPatientData() + { + + for (int i = 0; i < 1000; i++) + { + using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true)) + { + var IsHand = await _appService.TransferPatientData(); + + await unitOfWork.CompleteAsync(); + + _output.WriteLine($"处理{(i + 1) * 1000}"); + + if (!IsHand) + { + break; + } + } + } + + + + } + + + } +} diff --git a/test/Shentun.Peis.Application.Tests/GuideTypeAppServiceTest.cs b/test/Shentun.Peis.Application.Tests/GuideTypeAppServiceTest.cs index abd205c8..0eb7705f 100644 --- a/test/Shentun.Peis.Application.Tests/GuideTypeAppServiceTest.cs +++ b/test/Shentun.Peis.Application.Tests/GuideTypeAppServiceTest.cs @@ -17,7 +17,7 @@ namespace Shentun.Peis { public class GuideTypeAppServiceTest: PeisApplicationTestBase { - private readonly IRepository _repository; + private readonly IRepository _repository; private readonly GuideTypeAppService _guideTypeAppService; private readonly ITestOutputHelper _output; private readonly IUnitOfWorkManager _unitOfWorkManager; @@ -25,7 +25,7 @@ namespace Shentun.Peis { _output = testOutputHelper; _unitOfWorkManager = GetRequiredService(); - _repository = GetRequiredService>(); + _repository = GetRequiredService>(); _guideTypeAppService = GetRequiredService(); } @@ -104,7 +104,7 @@ namespace Shentun.Peis { using (var uow = _unitOfWorkManager.Begin()) { - await _guideTypeAppService.DeleteAsync(new Guid("3a0d6c49-cecf-19d9-0f4b-0923a28a3889")); + await _guideTypeAppService.DeleteAsync('0'); _output.WriteLine("删除成功"); } } diff --git a/test/Shentun.Peis.Application.Tests/SysParmAppServiceTest.cs b/test/Shentun.Peis.Application.Tests/SysParmAppServiceTest.cs index 9fa5d4e2..22c8d353 100644 --- a/test/Shentun.Peis.Application.Tests/SysParmAppServiceTest.cs +++ b/test/Shentun.Peis.Application.Tests/SysParmAppServiceTest.cs @@ -47,7 +47,7 @@ namespace Shentun.Peis using (var uow = _unitOfWorkManager.Begin()) { var item = await _appService.GetSysParmValueListInSysParmAsync( - new Guid("4ec3a153-36bf-4555-9f3f-7248aeb323fe"), "doctor_check_check_charge"); + new Guid("3a11fe49-5719-0e9e-dd44-0c4aff0900b0"), "doctor_check_check_charge"); _output.WriteLine(item.DisplayName+item.SysParmValueName + item.CreatorName + item.LastModifierName ); } diff --git a/test/Shentun.Peis.Domain.Tests/CacheServiceTest.cs b/test/Shentun.Peis.Domain.Tests/CacheServiceTest.cs index 8ecae943..2f7c0090 100644 --- a/test/Shentun.Peis.Domain.Tests/CacheServiceTest.cs +++ b/test/Shentun.Peis.Domain.Tests/CacheServiceTest.cs @@ -14,7 +14,7 @@ namespace Shentun.Peis { public class CacheServiceTest : PeisDomainTestBase { - private readonly IRepository _repository; + private readonly IRepository _repository; private readonly CacheService _cacheService; //private readonly IDbContextProvider _dbContextProvider; private readonly ITestOutputHelper _output; @@ -23,7 +23,7 @@ namespace Shentun.Peis { _output = output; - _repository = GetRequiredService>(); + _repository = GetRequiredService>(); _cacheService = GetRequiredService(); diff --git a/test/Shentun.Peis.Domain.Tests/GuideTypeManagerTest.cs b/test/Shentun.Peis.Domain.Tests/GuideTypeManagerTest.cs index 34de8e12..c894eb54 100644 --- a/test/Shentun.Peis.Domain.Tests/GuideTypeManagerTest.cs +++ b/test/Shentun.Peis.Domain.Tests/GuideTypeManagerTest.cs @@ -21,7 +21,7 @@ namespace Shentun.Peis { public class GuideTypeManagerTest : PeisDomainTestBase { - private readonly IRepository _repository; + private readonly IRepository _repository; private readonly GuideTypeManager _manager; //private readonly IDbContextProvider _dbContextProvider; private readonly ITestOutputHelper _output; @@ -33,7 +33,7 @@ namespace Shentun.Peis //_dbContextProvider = GetRequiredService>(); //_dbContextProvider = dbContextProvider; //_repository = Substitute.For>(); - _repository = GetRequiredService>(); + _repository = GetRequiredService>(); _itemTypeRepository = GetRequiredService>(); _manager = GetRequiredService(); @@ -80,7 +80,7 @@ namespace Shentun.Peis { using (var uow = _unitOfWorkManager.Begin()) { - var entity = await _repository.GetAsync(new Guid("3a0d9464-e69e-67d5-c292-b2e11fb334b1")); + var entity = await _repository.GetAsync('0'); await _manager.CheckAndDeleteAsync(entity); } diff --git a/test/Shentun.Peis.EntityFrameworkCore.Tests/EntityFrameworkCore/PeisEntityFrameworkCoreTestModule.cs b/test/Shentun.Peis.EntityFrameworkCore.Tests/EntityFrameworkCore/PeisEntityFrameworkCoreTestModule.cs index 8fa012cf..199c37dc 100644 --- a/test/Shentun.Peis.EntityFrameworkCore.Tests/EntityFrameworkCore/PeisEntityFrameworkCoreTestModule.cs +++ b/test/Shentun.Peis.EntityFrameworkCore.Tests/EntityFrameworkCore/PeisEntityFrameworkCoreTestModule.cs @@ -40,8 +40,8 @@ public class PeisEntityFrameworkCoreTestModule : AbpModule } private void ConfigurePostGress(IServiceCollection services) { - string connectStr = "Host=140.143.162.39;Port=5432;Database=ShentunPeis070703;User ID=postgres;Password=shentun123"; - + //string connectStr = "Host=140.143.162.39;Port=5432;Database=ShentunPeis070703;User ID=postgres;Password=shentun123"; + string connectStr = "Host=10.1.12.140;Port=5432;Database=ShentunPeis;User ID=postgres;Password=st123;"; services.Configure(options => {