diff --git a/IRaCIS.Core.Application/Helper/OSSService.cs b/IRaCIS.Core.Application/Helper/OSSService.cs index 082959569..c59668472 100644 --- a/IRaCIS.Core.Application/Helper/OSSService.cs +++ b/IRaCIS.Core.Application/Helper/OSSService.cs @@ -80,6 +80,20 @@ public class ObjectStoreServiceOptions public AWSOptions AWS { get; set; } + public bool IsOpenStoreSync { get; set; } + + public List SyncConfigList { get; set; } + +} + +public class SyncStoreConfig +{ + public string Domain { get; set; } + + public string Primary { get; set; } + + public string Target { get; set; } + } public class ObjectStoreDTO diff --git a/IRaCIS.Core.Application/Triggers/使用说明 b/IRaCIS.Core.Application/Triggers/使用说明 index b8930b505..3bb2cbeb8 100644 --- a/IRaCIS.Core.Application/Triggers/使用说明 +++ b/IRaCIS.Core.Application/Triggers/使用说明 @@ -1,7 +1,7 @@ -github Ŀַ:https://github.com/koenbeuk/EntityFrameworkCore.Triggered +github 项目地址:https://github.com/koenbeuk/EntityFrameworkCore.Triggered -Trigger ʹһΪ IBeforeSaveTrigger IAfterSaveTrigger +Trigger 使用一般分为两种 IBeforeSaveTrigger IAfterSaveTrigger -IBeforeSaveTrigger 񱣴֮ǰ Ȼ治Ҫύ񣨱ﷴ +IBeforeSaveTrigger 在事务保存之前 然后在里面不需要提交事务(避免稽查那里反复进) -IAfterSaveTrigger 񱣴֮󣨱Ҫά ƬڣҪ󣬲ҵĺСڸֵӣ \ No newline at end of file +IAfterSaveTrigger 在事务保存之后(比如要维护 访视拍片日期,首先数据要落库后,才能找到最大的和最小的日期赋值给访视) \ No newline at end of file diff --git a/IRaCIS.Core.Domain/Common/Dictionary.cs b/IRaCIS.Core.Domain/Common/Dictionary.cs index 7e9b52bd4..c862466ab 100644 --- a/IRaCIS.Core.Domain/Common/Dictionary.cs +++ b/IRaCIS.Core.Domain/Common/Dictionary.cs @@ -1,11 +1,11 @@ using IRaCIS.Core.Domain.Share; namespace IRaCIS.Core.Domain.Models; -[Comment("̨ - ֵҪͬ")] +[Comment("后台 - 字典表(需要同步)")] [Table("Dictionary")] public partial class Dictionary : BaseFullAuditEntity { - #region + #region 导航属性 [JsonIgnore] public List DoctorDicRelationList { get; set; } = new List(); [JsonIgnore] @@ -26,12 +26,12 @@ public partial class Dictionary : BaseFullAuditEntity public Guid? ConfigTypeId { get; set; } - [Comment("ֵ- ö|bool|")] + [Comment("字典类型- 枚举|bool|下拉框")] public DicDataTypeEnum DataTypeEnum { get; set; } public string Description { get; set; } = null!; - [Comment("Ƿֵ")] + [Comment("是否字典类型配置")] public bool IsConfig { get; set; } public bool IsEnable { get; set; } diff --git a/IRaCIS.Core.Domain/Dcotor/Doctor.cs b/IRaCIS.Core.Domain/Dcotor/Doctor.cs index 47d9259ea..6056174ab 100644 --- a/IRaCIS.Core.Domain/Dcotor/Doctor.cs +++ b/IRaCIS.Core.Domain/Dcotor/Doctor.cs @@ -2,13 +2,13 @@ using IRaCIS.Core.Domain.Share; namespace IRaCIS.Core.Domain.Models; -[Comment("ҽ - Ϣ")] +[Comment("医生 - 基础信息表")] [Table("Doctor")] public class Doctor : BaseFullAuditEntity { - #region + #region 导航属性 - [Comment("")] + [Comment("导航属性")] [JsonIgnore] public List DoctorDicRelationList { get; set; } = new List(); [JsonIgnore] @@ -85,12 +85,12 @@ public class Doctor : BaseFullAuditEntity public int GCP { get; set; } /// - /// GCP֤ʱ + /// GCP证书的时间 /// public DateTime? GCPTime { get; set; } /// - /// GCP + /// GCP机构 /// [MaxLength] public string GCPAgencies { get; set; } @@ -187,53 +187,53 @@ public class Doctor : BaseFullAuditEntity public string WeChat { get; set; } = string.Empty; /// - /// ְ + /// 工作兼职 /// [MaxLength] public string WorkPartTime { get; set; } = string.Empty; /// - /// ְEn + /// 工作兼职En /// [MaxLength] public string WorkPartTimeEn { get; set; } = string.Empty; /// - /// + /// 概述 /// [MaxLength] public string Summarize { get; set; } = string.Empty; /// - /// + /// 概述 /// [MaxLength] public string SummarizeEn { get; set; } = string.Empty; /// - /// п + /// 银行卡号 /// public string BankNum { get; set; } = string.Empty; /// - /// + /// 银行名称 /// [MaxLength] public string BankName { get; set; } = string.Empty; /// - /// + /// 开户行 /// public string OpeningBank { get; set; } = string.Empty; /// - /// ֤ + /// 身份证号 /// public string IdCard { get; set; } = string.Empty; /// - /// ֻ + /// 银行手机号 /// public string BankPhoneNum { get; set; } = string.Empty; @@ -242,42 +242,42 @@ public class Doctor : BaseFullAuditEntity public string FullName => LastName + " / " + FirstName; /// - /// ҽId + /// 医生Id /// public Guid? DoctorId { get; set; } /// - /// ĿId + /// 项目Id /// public Guid? TrialId { get; set; } /// - /// ѧ + /// 大学 /// public string UniversityAffiliated { get; set; } = string.Empty; /// - /// ѧ + /// 大学 /// public string UniversityAffiliatedCN { get; set; } = string.Empty; /// - /// + /// 城市 /// public string City { get; set; } = string.Empty; /// - /// + /// 城市 /// public string CityCN { get; set; } = string.Empty; /// - /// ҽԺ + /// 医院 /// public string HospitalName { get; set; } = string.Empty; /// - /// ҽԺ + /// 医院 /// public string HospitalNameCN { get; set; } = string.Empty; } diff --git a/IRaCIS.Core.Domain/Dcotor/DoctorDictionary.cs b/IRaCIS.Core.Domain/Dcotor/DoctorDictionary.cs index 3ee0413a6..c071b7a45 100644 --- a/IRaCIS.Core.Domain/Dcotor/DoctorDictionary.cs +++ b/IRaCIS.Core.Domain/Dcotor/DoctorDictionary.cs @@ -1,10 +1,10 @@ namespace IRaCIS.Core.Domain.Models; -[Comment("ҽ - ҽֵ")] +[Comment("医生 - 医生字典关联表")] [Table("DoctorDictionary")] public class DoctorDictionary : Entity { - #region + #region 导航属性 [JsonIgnore] [ForeignKey("DoctorId")] public Doctor Doctor { get; set; } diff --git a/IRaCIS.Core.Domain/Dcotor/DoctorSummarize.cs b/IRaCIS.Core.Domain/Dcotor/DoctorSummarize.cs index 64363a48a..884f6a4a5 100644 --- a/IRaCIS.Core.Domain/Dcotor/DoctorSummarize.cs +++ b/IRaCIS.Core.Domain/Dcotor/DoctorSummarize.cs @@ -2,44 +2,44 @@ using IRaCIS.Core.Domain.Share; namespace IRaCIS.Core.Domain.Models; -[Comment("ҽ - ")] +[Comment("医生 - 概述")] [Table("DoctorSummarize")] public class DoctorSummarize : BaseFullAuditEntity { /// - /// ҽId + /// 医生Id /// public Guid DoctorId { get; set; } /// - /// + /// 概述 /// [MaxLength] public string Summarize { get; set; } = string.Empty; /// - /// + /// 概述 /// [MaxLength] public string SummarizeEn { get; set; } = string.Empty; /// - /// Ƿģ + /// 是否是主模板 /// public bool IsMain { get; set; } /// - /// Ӧ֢ + /// 适应症 /// public string Indication { get; set; } /// - /// Ӧ֢ + /// 适应症 /// public string IndicationEn { get; set; } /// - /// ĿId + /// 项目Id /// public Guid? TrialId { get; set; } diff --git a/IRaCIS.Core.Domain/Dcotor/DoctorWorkload.cs b/IRaCIS.Core.Domain/Dcotor/DoctorWorkload.cs index b73d08d65..d3212c6b4 100644 --- a/IRaCIS.Core.Domain/Dcotor/DoctorWorkload.cs +++ b/IRaCIS.Core.Domain/Dcotor/DoctorWorkload.cs @@ -1,10 +1,10 @@ namespace IRaCIS.Core.Domain.Models; -[Comment("ҽƷ - ¼")] +[Comment("医生计费 - 工作量记录表")] [Table("DoctorWorkload")] public class Workload : BaseFullAuditEntity { - #region + #region 导航属性 #endregion diff --git a/IRaCIS.Core.Domain/Dcotor/Education.cs b/IRaCIS.Core.Domain/Dcotor/Education.cs index 76d890f63..36057bf4f 100644 --- a/IRaCIS.Core.Domain/Dcotor/Education.cs +++ b/IRaCIS.Core.Domain/Dcotor/Education.cs @@ -1,10 +1,10 @@ namespace IRaCIS.Core.Domain.Models; -[Comment("ҽ - Ϣ")] +[Comment("医生 - 教育信息")] [Table("Education")] public class Education : BaseFullAuditEntity { - #region + #region 导航属性 #endregion public DateOnly? BeginDate { get; set; } diff --git a/IRaCIS.Core.Domain/Dcotor/Postgraduate.cs b/IRaCIS.Core.Domain/Dcotor/Postgraduate.cs index 6af4ba9b2..a8498fadf 100644 --- a/IRaCIS.Core.Domain/Dcotor/Postgraduate.cs +++ b/IRaCIS.Core.Domain/Dcotor/Postgraduate.cs @@ -1,10 +1,10 @@ namespace IRaCIS.Core.Domain.Models; -[Comment("ҽ - ")] +[Comment("医生 - 继续教育经历")] [Table("Postgraduate")] public class Postgraduate : BaseFullAuditEntity { - #region + #region 导航属性 [JsonIgnore] [ForeignKey("HospitalId")] public Hospital HospitalEnt { get; set; } diff --git a/IRaCIS.Core.Domain/Dcotor/ResearchPublication.cs b/IRaCIS.Core.Domain/Dcotor/ResearchPublication.cs index bfb5450e7..97d766af3 100644 --- a/IRaCIS.Core.Domain/Dcotor/ResearchPublication.cs +++ b/IRaCIS.Core.Domain/Dcotor/ResearchPublication.cs @@ -1,10 +1,10 @@ namespace IRaCIS.Core.Domain.Models; -[Comment("ҽ - ѧ¼")] +[Comment("医生 - 科研学术记录")] [Table("ResearchPublication")] public partial class ResearchPublication : BaseFullAuditEntity { - #region + #region 导航属性 #endregion public Guid DoctorId { get; set; } diff --git a/IRaCIS.Core.Domain/Dcotor/TrialExperience.cs b/IRaCIS.Core.Domain/Dcotor/TrialExperience.cs index f7f4b6f67..530a5cfff 100644 --- a/IRaCIS.Core.Domain/Dcotor/TrialExperience.cs +++ b/IRaCIS.Core.Domain/Dcotor/TrialExperience.cs @@ -2,7 +2,7 @@ using IRaCIS.Core.Domain.Share; namespace IRaCIS.Core.Domain.Models; -[Comment("ҽ - Ŀٴ")] +[Comment("医生 - 项目临床经历")] [Table("TrialExperience")] public partial class TrialExperience : BaseFullAuditEntity { @@ -10,7 +10,7 @@ public partial class TrialExperience : BaseFullAuditEntity - #region + #region 导航属性 [JsonIgnore] [ForeignKey("TrialId")] @@ -33,37 +33,37 @@ public partial class TrialExperience : BaseFullAuditEntity public DateTime? EndTime { get; set; } /// - /// + /// 其他分期 /// public string OtherStages { get; set; } = string.Empty; /// - /// ׼ + /// 其他标准 /// public string OtherCriterion { get; set; } = string.Empty; /// - /// Ӧ֢ö + /// 适应症的枚举 /// public int IndicationEnum { get; set; } = -1; /// - /// + /// 数据类型 /// public ExperienceDataType ExperienceDataType { get; set; } /// - /// Ӧ֢ID + /// 适应症类型ID /// public Guid IndicationTypeId { get; set; } = Guid.Empty; /// - /// ĿId + /// 项目Id /// public Guid? TrialId { get; set; } /// - /// Ƭ׼ + /// 阅片标准 /// public CriterionType? CriterionType { get; set; } } @@ -72,22 +72,22 @@ public partial class TrialExperience : BaseFullAuditEntity public enum ExperienceDataType { /// - /// ϵͳֶ + /// 系统手动添加 /// System = 0, /// - /// Ŀֶӻͬϵͳƹ + /// 项目手动添加或者同系统复制过来的 /// Trial=1, /// - /// ĿԶ + /// 项目自动添加 /// TrialAuto = 2, /// - /// ϵͳԶ + /// 系统自动添加 /// SystemAuto = 3, } \ No newline at end of file diff --git a/IRaCIS.Core.Domain/Financial/Payment.cs b/IRaCIS.Core.Domain/Financial/Payment.cs index 3bb78de71..ea7c59e49 100644 --- a/IRaCIS.Core.Domain/Financial/Payment.cs +++ b/IRaCIS.Core.Domain/Financial/Payment.cs @@ -1,6 +1,6 @@ namespace IRaCIS.Core.Domain.Models; -[Comment("ҽƷ - ÿ֧¼")] +[Comment("医生计费 - 每月支付记录表")] [Table("Payment")] public partial class Payment : BaseFullAuditEntity { diff --git a/IRaCIS.Core.Domain/Financial/PaymentAdjustment.cs b/IRaCIS.Core.Domain/Financial/PaymentAdjustment.cs index 93561e718..53db66951 100644 --- a/IRaCIS.Core.Domain/Financial/PaymentAdjustment.cs +++ b/IRaCIS.Core.Domain/Financial/PaymentAdjustment.cs @@ -1,6 +1,6 @@ namespace IRaCIS.Core.Domain.Models; -[Comment("ҽƷ - ÿ֧¼")] +[Comment("医生计费 - 每月支付记录表")] [Table("PaymentAdjustment")] public partial class PaymentAdjustment : BaseFullAuditEntity { diff --git a/IRaCIS.Core.Domain/Financial/PaymentDetail.cs b/IRaCIS.Core.Domain/Financial/PaymentDetail.cs index 964185359..e444794f1 100644 --- a/IRaCIS.Core.Domain/Financial/PaymentDetail.cs +++ b/IRaCIS.Core.Domain/Financial/PaymentDetail.cs @@ -1,6 +1,6 @@ namespace IRaCIS.Core.Domain.Models; -[Comment("ҽƷ - ÿ֧")] +[Comment("医生计费 - 每月支付详情表")] [Table("PaymentDetail")] public partial class PaymentDetail : BaseFullAuditEntity { diff --git a/IRaCIS.Core.Domain/Financial/RankPrice.cs b/IRaCIS.Core.Domain/Financial/RankPrice.cs index 70a633789..9d398c850 100644 --- a/IRaCIS.Core.Domain/Financial/RankPrice.cs +++ b/IRaCIS.Core.Domain/Financial/RankPrice.cs @@ -1,6 +1,6 @@ namespace IRaCIS.Core.Domain.Models; -[Comment("ҽƷ - ͬʱ۸")] +[Comment("医生计费 - 不同时间点价格设置")] [Table("RankPrice")] public partial class RankPrice : BaseFullAuditEntity { diff --git a/IRaCIS.Core.Domain/Financial/ReviewerPayInformation.cs b/IRaCIS.Core.Domain/Financial/ReviewerPayInformation.cs index 55a8adad9..dfac351d6 100644 --- a/IRaCIS.Core.Domain/Financial/ReviewerPayInformation.cs +++ b/IRaCIS.Core.Domain/Financial/ReviewerPayInformation.cs @@ -1,6 +1,6 @@ namespace IRaCIS.Core.Domain.Models; -[Comment("ҽƷ - ֧Ϣ")] +[Comment("医生计费 - 支付信息表")] [Table("DoctorPayInformation")] public partial class ReviewerPayInformation : BaseFullAuditEntity { diff --git a/IRaCIS.Core.Domain/Financial/TrialPaymentPrice.cs b/IRaCIS.Core.Domain/Financial/TrialPaymentPrice.cs index 32a8a3880..c87edba2a 100644 --- a/IRaCIS.Core.Domain/Financial/TrialPaymentPrice.cs +++ b/IRaCIS.Core.Domain/Financial/TrialPaymentPrice.cs @@ -1,6 +1,6 @@ namespace IRaCIS.Core.Domain.Models; -[Comment("ҽƷ - Ŀ֧")] +[Comment("医生计费 - 项目支付配置")] [Table("TrialPaymentPrice")] public partial class TrialPaymentPrice : BaseFullAuditEntity { @@ -17,6 +17,6 @@ public partial class TrialPaymentPrice : BaseFullAuditEntity [DecimalPrecision(18, 2)] public decimal AdjustmentMultiple { get; set; } = 1; - [Comment("Ƿ ΪĿ")] + [Comment("是否有 为新项目")] public bool? IsNewTrial { get; set; } = false; } diff --git a/IRaCIS.Core.Domain/Financial/VolumeReward.cs b/IRaCIS.Core.Domain/Financial/VolumeReward.cs index 036d9189d..eb01b7ccf 100644 --- a/IRaCIS.Core.Domain/Financial/VolumeReward.cs +++ b/IRaCIS.Core.Domain/Financial/VolumeReward.cs @@ -1,6 +1,6 @@ namespace IRaCIS.Core.Domain.Models; -[Comment("ҽƷ - ")] +[Comment("医生计费 - 奖励")] [Table("VolumeReward")] public partial class VolumeReward : BaseFullAuditEntity { diff --git a/IRaCIS.Core.Domain/Image/FileUploadRecord.cs b/IRaCIS.Core.Domain/Image/FileUploadRecord.cs index e5e54eae1..09808e10d 100644 --- a/IRaCIS.Core.Domain/Image/FileUploadRecord.cs +++ b/IRaCIS.Core.Domain/Image/FileUploadRecord.cs @@ -7,10 +7,14 @@ public class FileUploadRecord : BaseFullAuditEntity #region 导航属性 [JsonIgnore] public Trial Trial { get; set; } - + [JsonIgnore] public Subject Subject { get; set; } - + [JsonIgnore] public SubjectVisit SubjectVisit { get; set; } + [JsonIgnore] + public DicomStudy DicomStudy { get; set; } + [JsonIgnore] + public NoneDicomStudy NoneDicomStudy { get; set; } #endregion public Guid? TrialId { get; set; } @@ -19,35 +23,50 @@ public class FileUploadRecord : BaseFullAuditEntity public Guid? SubjectVisitId { get; set; } + public Guid? DicomStudyId { get; set; } + public Guid? NoneDicomStudyId { get; set; } + + + [Comment("文件标识ID")] + public string FileMarkId { get; set; } + + [Comment("上传批次")] + public string UploadBatchId { get; set; } + + [Comment("该批次数据类型")] + public int BatchDataType { get; set; } + + [Comment("上传区域")] + public string UploadRegion { get; set; } + + [Comment("目标区域")] + public string TargetRegion { get; set; } + + [Comment("文件类型")] + public string FileType { get; set; } public string FileName { get; set; } public long FileSize { get; set; } - public string FileType { get; set; } - public string UploadRegion { get; set; } - - [Comment("上传结束时间")] - public DateTime UploadFinishedTime { get; set; } [StringLength(1000)] public string Path { get; set; } - [Comment("文件标识ID")] - public string FileMarkId { get; set; } - - [Comment("是否需要同步")] public bool? IsNeedSync { get; set; } + [Comment("同步优先级")] + public int? Priority { get; set; } [Comment("是否已同步-最后一个任务的状态")] public bool? IsSync { get; set; } [Comment("同步结束时间-最后一个任务的时间")] - public DateTime? syncFinishedTime { get; set; } + public DateTime? SyncFinishedTime { get; set; } + public string IP { get; set; } @@ -65,7 +84,6 @@ public class UploadFileSyncRecord : BaseFullAuditEntity public Guid FileUploadRecordId { get; set; } - public int Priority { get; set; } public DateTime? StartTime { get; set; } @@ -80,14 +98,14 @@ public class UploadFileSyncRecord : BaseFullAuditEntity public enum jobState { //待启动 - PENDING= 0, + PENDING = 0, //上传中 - RUNNING= 1, + RUNNING = 1, - SUCCESS= 2, + SUCCESS = 2, - FAILED= 3, + FAILED = 3, - CANCELLED= 4 + CANCELLED = 4 } \ No newline at end of file diff --git a/IRaCIS.Core.Domain/Institution/CRO.cs b/IRaCIS.Core.Domain/Institution/CRO.cs index 725c41cc2..53c979cad 100644 --- a/IRaCIS.Core.Domain/Institution/CRO.cs +++ b/IRaCIS.Core.Domain/Institution/CRO.cs @@ -1,10 +1,10 @@ namespace IRaCIS.Core.Domain.Models; -[Comment(" - CRO")] +[Comment("机构 - CRO")] [Table("CROCompany")] public class CRO : BaseFullAuditEntity { - #region + #region 导航属性 #endregion @@ -14,7 +14,7 @@ public class CRO : BaseFullAuditEntity public string CRONameCN { get; set; } = null!; - [Comment("ǷĿ")] + [Comment("是否是项目级别")] public bool IsTrialLevel { get; set; } public Guid? TrialId { get; set; } diff --git a/IRaCIS.Core.Domain/Institution/Site.cs b/IRaCIS.Core.Domain/Institution/Site.cs index 536222c48..2211f02dd 100644 --- a/IRaCIS.Core.Domain/Institution/Site.cs +++ b/IRaCIS.Core.Domain/Institution/Site.cs @@ -1,10 +1,10 @@ namespace IRaCIS.Core.Domain.Models; -[Comment(" - Site")] +[Comment("机构 - Site")] [Table("Site")] public class Site : BaseFullAuditEntity { - #region + #region 导航属性 [JsonIgnore] [ForeignKey("HospitalId")] public Hospital Hospital { get; set; } diff --git a/IRaCIS.Core.Domain/Institution/Sponsor.cs b/IRaCIS.Core.Domain/Institution/Sponsor.cs index 8105301fe..03060d202 100644 --- a/IRaCIS.Core.Domain/Institution/Sponsor.cs +++ b/IRaCIS.Core.Domain/Institution/Sponsor.cs @@ -1,10 +1,10 @@ namespace IRaCIS.Core.Domain.Models; -[Comment(" - Sponsor")] +[Comment("机构 - Sponsor")] [Table("Sponsor")] public partial class Sponsor : BaseFullAuditEntity { - #region + #region 导航属性 #endregion public string SponsorName { get; set; } = String.Empty; diff --git a/IRaCIS.Core.Domain/Management/User.cs b/IRaCIS.Core.Domain/Management/User.cs index a507eff9f..d2964c322 100644 --- a/IRaCIS.Core.Domain/Management/User.cs +++ b/IRaCIS.Core.Domain/Management/User.cs @@ -3,11 +3,11 @@ using IRaCIS.Core.Domain.Share; namespace IRaCIS.Core.Domain.Models; -[Comment("̨ - ϵͳ˻ɫϵ")] +[Comment("后台 - 系统账户角色关系表")] [Table("User")] public class UserRole : BaseFullAuditEntity { - #region + #region 导航属性 [ForeignKey("IdentityUserId")] [JsonIgnore] @@ -37,24 +37,24 @@ public class UserRole : BaseFullAuditEntity public string LastName { get; set; } - [Comment("Զлһ")] + [Comment("自动切换下一个任务")] public bool AutoCutNextTask { get; set; } /// - /// Ƿ˫ + /// 是否双屏 /// public bool IsDoubleScreen { get; set; } = false; - [Comment("ҽ˺ź󣬻ֵ")] + [Comment("医生生成账号后,会有值")] public Guid? DoctorId { get; set; } public UserTypeEnum UserTypeEnum { get; set; } public Guid UserTypeId { get; set; } - #region ֶ + #region 新增字段 public Guid IdentityUserId { get; set; } @@ -63,7 +63,7 @@ public class UserRole : BaseFullAuditEntity #endregion } -[Comment("̨ - ϵͳʵ˻")] +[Comment("后台 - 系统真实账户表")] [Table("IdentityUser")] public class IdentityUser : BaseFullAuditEntity { @@ -87,7 +87,7 @@ public class IdentityUser : BaseFullAuditEntity [Projectable] public string FullName => LastName + " / " + FirstName; - #region ûϢ + #region 用户信息 public int Code { get; set; } public string UserCode { get; set; } @@ -117,20 +117,20 @@ public class IdentityUser : BaseFullAuditEntity public string PositionName { get; set; } - [Comment("ֶηϳûɫ棬ɾ")] + [Comment("这个字段废除,放在用户角色上面,后续删除")] public bool AutoCutNextTask { get; set; } public string DepartmentName { get; set; } - [Comment("״ε¼Ҫ޸")] + [Comment("首次登录需要修改密码")] public bool IsFirstAdd { get; set; } = true; public bool IsTestUser { get; set; } - [Comment("ڲû ⲿû")] + [Comment("内部用户 外部用户")] public bool IsZhiZhun { get; set; } - [Comment("һ޸ʱ")] + [Comment("上一次修改密码的时间")] public DateTime? LastChangePassWordTime { get; set; } public string LastLoginIP { get; set; } @@ -140,7 +140,7 @@ public class IdentityUser : BaseFullAuditEntity #endregion - #region ûԴ + #region 用户来源 public UserCeateSource UserCeateSource { get; set; } @@ -149,12 +149,12 @@ public class IdentityUser : BaseFullAuditEntity #endregion /// - /// ûЭId + /// 用户协议Id /// public Guid? UserAgreementId { get; set; } /// - /// ˽Id + /// 隐私政策Id /// public Guid? PrivacyPolicyId { get; set; } } diff --git a/IRaCIS.Core.Domain/Management/UserTypeMenu.cs b/IRaCIS.Core.Domain/Management/UserTypeMenu.cs index 3367741c3..0328a0b09 100644 --- a/IRaCIS.Core.Domain/Management/UserTypeMenu.cs +++ b/IRaCIS.Core.Domain/Management/UserTypeMenu.cs @@ -1,10 +1,10 @@ namespace IRaCIS.Core.Domain.Models; -[Comment("̨ - ϵͳûͲ˵мϵ Ҫͬ")] +[Comment("后台 - 系统用户类型菜单中间关系表 (需要同步)")] [Table("UserTypeMenu")] public partial class UserTypeMenu : Entity { - #region + #region 导航属性 [JsonIgnore] [ForeignKey("UserTypeId")] diff --git a/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingSystemCriterionDictionary.cs b/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingSystemCriterionDictionary.cs index bb69ac4ee..38672124e 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingSystemCriterionDictionary.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingSystemCriterionDictionary.cs @@ -2,11 +2,11 @@ using IRaCIS.Core.Domain.Share; namespace IRaCIS.Core.Domain.Models; -[Comment("ϵͳ׼ - ȫ Ҫͬ")] +[Comment("系统标准 - 全局配置 (需要同步)")] [Table("ReadingSystemCriterionDictionary")] public class ReadingSystemCriterionDictionary : BaseAddAuditEntity { - #region + #region 导航属性 [JsonIgnore] [ForeignKey("DictionaryId")] @@ -20,6 +20,6 @@ public class ReadingSystemCriterionDictionary : BaseAddAuditEntity public bool IsBaseLineUse { get; set; } = false; public bool IsFollowVisitUse { get; set; } = false; - [Comment("׼ֵ")] + [Comment("标准字典分组")] public CrterionDictionaryGroup CrterionDictionaryGroup { get; set; } = CrterionDictionaryGroup.General; } diff --git a/IRaCIS.Core.Domain/Trial/EnrollDetail.cs b/IRaCIS.Core.Domain/Trial/EnrollDetail.cs index 50050ce35..54bb7a5bb 100644 --- a/IRaCIS.Core.Domain/Trial/EnrollDetail.cs +++ b/IRaCIS.Core.Domain/Trial/EnrollDetail.cs @@ -2,14 +2,14 @@ using IRaCIS.Core.Domain.Share; namespace IRaCIS.Core.Domain.Models; -[Comment("ҽ - Ŀ̼¼")] +[Comment("医生 - 入组项目流程记录表")] [Table("EnrollDetail")] public partial class EnrollDetail : BaseAddAuditEntity { - #region + #region 导航属性 [JsonIgnore] public virtual TrialStatusDetail TrialDetail { get; set; } [JsonIgnore] diff --git a/IRaCIS.Core.Domain/Trial/TrialDictionary.cs b/IRaCIS.Core.Domain/Trial/TrialDictionary.cs index 5278c271e..1d5f841bc 100644 --- a/IRaCIS.Core.Domain/Trial/TrialDictionary.cs +++ b/IRaCIS.Core.Domain/Trial/TrialDictionary.cs @@ -1,10 +1,10 @@ namespace IRaCIS.Core.Domain.Models; -[Comment("Ŀ - Ŀֵϵ")] +[Comment("项目 - 项目字典关系表")] [Table("TrialDictionary")] public partial class TrialDictionary : Entity { - #region + #region 导航属性 [JsonIgnore] public virtual Trial Trial { get; set; } [JsonIgnore] diff --git a/IRaCIS.Core.Domain/Trial/TrialStatusDetail.cs b/IRaCIS.Core.Domain/Trial/TrialStatusDetail.cs index 740c60fa6..66757142e 100644 --- a/IRaCIS.Core.Domain/Trial/TrialStatusDetail.cs +++ b/IRaCIS.Core.Domain/Trial/TrialStatusDetail.cs @@ -1,10 +1,10 @@ namespace IRaCIS.Core.Domain.Models; -[Comment("Ŀ - ̼¼")] +[Comment("项目 - 入组流程记录")] [Table("TrialStatus")] public partial class TrialStatusDetail : BaseAddAuditEntity { - #region + #region 导航属性 [JsonIgnore] public Trial Trial { get; set; } #endregion diff --git a/IRaCIS.Core.Infra.EFCore/CodeFirst使用说明 b/IRaCIS.Core.Infra.EFCore/CodeFirst使用说明 index 3a4bad769..e5c00117f 100644 --- a/IRaCIS.Core.Infra.EFCore/CodeFirst使用说明 +++ b/IRaCIS.Core.Infra.EFCore/CodeFirst使用说明 @@ -1,58 +1,58 @@ -# ̨ʹ÷ʽ +# 程序包管理控制台使用方式 -1Ǩļ(add-migration init -Project IRaCIS.Core.Infra.EFCore ) +1、生成迁移文件(add-migration init -Project IRaCIS.Core.Infra.EFCore ) - add-migration xxx + add-migration xxx名字 -2ƳɵǨļ +2、移除生成的迁移文件 Remove-Migration -3ݿΪǨ +3、以下命令将数据库更新为最新迁移 Update-Database -4ݿΪǨƣ +4、以下命令将数据库更新为给定迁移: Update-Database xxxName -5һָ from ǨƵָ to ǨƵ SQL ű +5、以下命令将生成一个从指定 from 迁移到指定 to 迁移的 SQL 脚本。 Script-Migration from to -ַ Ĭϳ400Ҫע - [StringLength(1000)] 1000 - [MaxLength] ԶΪ nvarchar(max) -decimal - Ĭǣ [DecimalPrecision(18, 2)] -Ŀñ磺 [DecimalPrecision(18, 4)] +针对字符串类型 不是默认长度400的需要标注: + 比如 [StringLength(1000)] 设置1000 + 比如 [MaxLength] 自动设置为 nvarchar(max) +针对decimal 类型 + 默认是: [DecimalPrecision(18, 2)] +如果其他的可以这样设置比如: [DecimalPrecision(18, 4)] -# ʹdotnet Ǩ(dotnet ef dbcontext list -p IRaCIS.Core.Infra.EFCore ) +# 使用dotnet 命令迁移(dotnet ef dbcontext list -p IRaCIS.Core.Infra.EFCore ) -# dotnet ef migrations add Ǩ -p Ŀ -c ݿ -o ǨļĿ¼ +# dotnet ef migrations add 本地迁移名字 -p 项目名 -c 数据库上下文名 -o 迁移文件生成目录 -1Ǩļ dotnet ef migrations add Initial -s IRaCIS.Core.API -p IRaCIS.Core.Infra.EFCore -c IRaCISDBContext -o CodeFirst_MSSQL/Migrations +1、生成迁移文件 (dotnet ef migrations add Initial -s IRaCIS.Core.API -p IRaCIS.Core.Infra.EFCore -c IRaCISDBContext -o CodeFirst_MSSQL/Migrations) dotnet ef migrations add Initial -p IRaCIS.Core.Infra.EFCore -2ɵǨļ +2、撤销生成的迁移文件 dotnet ef migrations remove -p IRaCIS.Core.Infra.EFCore -3Ǩļµݿ +3、将迁移文件更新到数据库 dotnet ef database update -p IRaCIS.Core.Infra.EFCore -4ݿΪǨ +4、以下命令将数据库更新为给定迁移 dotnet ef database update xxxName -p IRaCIS.Core.Infra.EFCore -5һָ from ǨƵָ to ǨƵ SQL ű +5、以下命令将生成一个从指定 from 迁移到指定 to 迁移的 SQL 脚本。 dotnet ef migrations script from to -p IRaCIS.Core.Infra.EFCore -6鿴Ǩб +6、查看迁移列表 dotnet ef migrations list -p IRaCIS.Core.Infra.EFCore \ No newline at end of file diff --git a/IRaCIS.Core.Test/AutoTemplatel.ps1 b/IRaCIS.Core.Test/AutoTemplatel.ps1 index caeeefd0a..3bf3fc6a1 100644 --- a/IRaCIS.Core.Test/AutoTemplatel.ps1 +++ b/IRaCIS.Core.Test/AutoTemplatel.ps1 @@ -1,12 +1,12 @@ -# б Scaffold +# 构建表名参数列表用于 Scaffold 命令 param ( [string[]]$Tables ) -# б +# 构建表名参数列表 $tablesForScaffold = "" foreach ($table in $Tables) { $tablesForScaffold += "-t $table " @@ -15,15 +15,15 @@ foreach ($table in $Tables) { $tablesForRun = $Tables -join " " -Write-Host "ִ Scaffold-DbContext..." +Write-Host "正在执行 Scaffold-DbContext..." #dotnet ef dbcontext scaffold "Server=106.14.89.110,1435;Database=Test_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true" Microsoft.EntityFrameworkCore.SqlServer -p IRaCIS.Core.Test -d -o GenerateFolder -c "TempContext" $tablesForScaffold $scaffoldCommand = "dotnet ef dbcontext scaffold `"Server=106.14.89.110,1435;Database=Test_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true`" Microsoft.EntityFrameworkCore.SqlServer -p IRaCIS.Core.Test -d -o GenerateContextModelFolder -c `"TempContext`" $tablesForScaffold" Invoke-Expression $scaffoldCommand -Write-Host "ִ dotnet run..." +Write-Host "正在执行 dotnet run..." #dotnet run --project IRaCIS.Core.Test -- $tablesForRun -# ʹ Invoke-Expression ֱִйõ +# 使用 Invoke-Expression 直接执行构造好的命令 $runCommand = "dotnet run --project IRaCIS.Core.Test -- $tablesForRun" Invoke-Expression $runCommand \ No newline at end of file diff --git a/IRaCIS.Core.Test/CodeFirstTest/CodeFirst使用说明 b/IRaCIS.Core.Test/CodeFirstTest/CodeFirst使用说明 index e126a2272..c4a92378b 100644 --- a/IRaCIS.Core.Test/CodeFirstTest/CodeFirst使用说明 +++ b/IRaCIS.Core.Test/CodeFirstTest/CodeFirst使用说明 @@ -1,29 +1,29 @@ -#οѧϰĵ +#参考学习文档 https://www.cnblogs.com/cqpanda/p/16815263.html -# ʹdotnet Ǩ(dotnet ef dbcontext list -p IRaCIS.Core.Infra.EFCore ) +# 使用dotnet 命令迁移(dotnet ef dbcontext list -p IRaCIS.Core.Infra.EFCore ) -# dotnet ef migrations add Ǩ -p Ŀ -c ݿ -o ǨļĿ¼ +# dotnet ef migrations add 本地迁移名字 -p 项目名 -c 数据库上下文名 -o 迁移文件生成目录 -1Ǩļ dotnet ef migrations add xxx -s IRaCIS.Core.API -p IRaCIS.Core.Infra.EFCore -c IRaCISDBContext -o CodeFirst_MSSQL/Migrations +1、生成迁移文件 (dotnet ef migrations add xxx -s IRaCIS.Core.API -p IRaCIS.Core.Infra.EFCore -c IRaCISDBContext -o CodeFirst_MSSQL/Migrations) dotnet ef migrations add xxx -p IRaCIS.Core.Test -c IRCContext -2ɵǨļ +2、撤销生成的迁移文件 dotnet ef migrations remove -p IRaCIS.Core.Test -c IRCContext -3Ǩļµݿ +3、将迁移文件更新到数据库 dotnet ef database update -p IRaCIS.Core.Test -c IRCContext -4ݿΪǨ +4、以下命令将数据库更新为给定迁移 dotnet ef database update xxxName -p IRaCIS.Core.Test -c IRCContext -5һָ from ǨƵָ to ǨƵ SQL ű +5、以下命令将生成一个从指定 from 迁移到指定 to 迁移的 SQL 脚本。 dotnet ef migrations script from to -p IRaCIS.Core.Test -c IRCContext