修改模型编码测试提交
continuous-integration/drone/push Build is running Details

Test_IRC_Net8
hang 2026-03-10 11:37:48 +08:00
parent c906284f07
commit c1743c2934
31 changed files with 186 additions and 154 deletions

View File

@ -80,6 +80,20 @@ public class ObjectStoreServiceOptions
public AWSOptions AWS { get; set; } public AWSOptions AWS { get; set; }
public bool IsOpenStoreSync { get; set; }
public List<SyncStoreConfig> SyncConfigList { get; set; }
}
public class SyncStoreConfig
{
public string Domain { get; set; }
public string Primary { get; set; }
public string Target { get; set; }
} }
public class ObjectStoreDTO public class ObjectStoreDTO

View File

@ -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 在事务保存之后(比如要维护 访视拍片日期,首先数据要落库后,才能找到最大的和最小的日期赋值给访视) IAfterSaveTrigger 在事务保存之后(比如要维护 访视拍片日期,首先数据要落库后,才能找到最大的和最小的日期赋值给访视)

View File

@ -1,11 +1,11 @@
using IRaCIS.Core.Domain.Share; using IRaCIS.Core.Domain.Share;
namespace IRaCIS.Core.Domain.Models; namespace IRaCIS.Core.Domain.Models;
[Comment("后台 - 字典表(需要同步)")] [Comment("后台 - 字典表(需要同步)")]
[Table("Dictionary")] [Table("Dictionary")]
public partial class Dictionary : BaseFullAuditEntity public partial class Dictionary : BaseFullAuditEntity
{ {
#region 导航属性 #region 导航属性
[JsonIgnore] [JsonIgnore]
public List<DoctorDictionary> DoctorDicRelationList { get; set; } = new List<DoctorDictionary>(); public List<DoctorDictionary> DoctorDicRelationList { get; set; } = new List<DoctorDictionary>();
[JsonIgnore] [JsonIgnore]
@ -26,12 +26,12 @@ public partial class Dictionary : BaseFullAuditEntity
public Guid? ConfigTypeId { get; set; } public Guid? ConfigTypeId { get; set; }
[Comment("字典类型- 枚举|bool|下拉框")] [Comment("字典类型- 枚举|bool|下拉框")]
public DicDataTypeEnum DataTypeEnum { get; set; } public DicDataTypeEnum DataTypeEnum { get; set; }
public string Description { get; set; } = null!; public string Description { get; set; } = null!;
[Comment("是否字典类型配置")] [Comment("是否字典类型配置")]
public bool IsConfig { get; set; } public bool IsConfig { get; set; }
public bool IsEnable { get; set; } public bool IsEnable { get; set; }

View File

@ -2,13 +2,13 @@ using IRaCIS.Core.Domain.Share;
namespace IRaCIS.Core.Domain.Models; namespace IRaCIS.Core.Domain.Models;
[Comment("医生 - 基础信息表")] [Comment("医生 - 基础信息表")]
[Table("Doctor")] [Table("Doctor")]
public class Doctor : BaseFullAuditEntity public class Doctor : BaseFullAuditEntity
{ {
#region 导航属性 #region 导航属性
[Comment("导航属性")] [Comment("导航属性")]
[JsonIgnore] [JsonIgnore]
public List<DoctorDictionary> DoctorDicRelationList { get; set; } = new List<DoctorDictionary>(); public List<DoctorDictionary> DoctorDicRelationList { get; set; } = new List<DoctorDictionary>();
[JsonIgnore] [JsonIgnore]
@ -85,12 +85,12 @@ public class Doctor : BaseFullAuditEntity
public int GCP { get; set; } public int GCP { get; set; }
/// <summary> /// <summary>
/// GCP证书的时间 /// GCP证书的时间
/// </summary> /// </summary>
public DateTime? GCPTime { get; set; } public DateTime? GCPTime { get; set; }
/// <summary> /// <summary>
/// GCP机构 /// GCP机构
/// </summary> /// </summary>
[MaxLength] [MaxLength]
public string GCPAgencies { get; set; } public string GCPAgencies { get; set; }
@ -187,53 +187,53 @@ public class Doctor : BaseFullAuditEntity
public string WeChat { get; set; } = string.Empty; public string WeChat { get; set; } = string.Empty;
/// <summary> /// <summary>
/// 工作兼职 /// 工作兼职
/// </summary> /// </summary>
[MaxLength] [MaxLength]
public string WorkPartTime { get; set; } = string.Empty; public string WorkPartTime { get; set; } = string.Empty;
/// <summary> /// <summary>
/// 工作兼职En /// 工作兼职En
/// </summary> /// </summary>
[MaxLength] [MaxLength]
public string WorkPartTimeEn { get; set; } = string.Empty; public string WorkPartTimeEn { get; set; } = string.Empty;
/// <summary> /// <summary>
/// 概述 /// 概述
/// </summary> /// </summary>
[MaxLength] [MaxLength]
public string Summarize { get; set; } = string.Empty; public string Summarize { get; set; } = string.Empty;
/// <summary> /// <summary>
/// 概述 /// 概述
/// </summary> /// </summary>
[MaxLength] [MaxLength]
public string SummarizeEn { get; set; } = string.Empty; public string SummarizeEn { get; set; } = string.Empty;
/// <summary> /// <summary>
/// 银行卡号 /// 银行卡号
/// </summary> /// </summary>
public string BankNum { get; set; } = string.Empty; public string BankNum { get; set; } = string.Empty;
/// <summary> /// <summary>
/// 银行名称 /// 银行名称
/// </summary> /// </summary>
[MaxLength] [MaxLength]
public string BankName { get; set; } = string.Empty; public string BankName { get; set; } = string.Empty;
/// <summary> /// <summary>
/// 开户行 /// 开户行
/// </summary> /// </summary>
public string OpeningBank { get; set; } = string.Empty; public string OpeningBank { get; set; } = string.Empty;
/// <summary> /// <summary>
/// 身份证号 /// 身份证号
/// </summary> /// </summary>
public string IdCard { get; set; } = string.Empty; public string IdCard { get; set; } = string.Empty;
/// <summary> /// <summary>
/// 银行手机号 /// 银行手机号
/// </summary> /// </summary>
public string BankPhoneNum { get; set; } = string.Empty; public string BankPhoneNum { get; set; } = string.Empty;
@ -242,42 +242,42 @@ public class Doctor : BaseFullAuditEntity
public string FullName => LastName + " / " + FirstName; public string FullName => LastName + " / " + FirstName;
/// <summary> /// <summary>
/// 医生Id /// 医生Id
/// </summary> /// </summary>
public Guid? DoctorId { get; set; } public Guid? DoctorId { get; set; }
/// <summary> /// <summary>
/// 项目Id /// 项目Id
/// </summary> /// </summary>
public Guid? TrialId { get; set; } public Guid? TrialId { get; set; }
/// <summary> /// <summary>
/// 大学 /// 大学
/// </summary> /// </summary>
public string UniversityAffiliated { get; set; } = string.Empty; public string UniversityAffiliated { get; set; } = string.Empty;
/// <summary> /// <summary>
/// 大学 /// 大学
/// </summary> /// </summary>
public string UniversityAffiliatedCN { get; set; } = string.Empty; public string UniversityAffiliatedCN { get; set; } = string.Empty;
/// <summary> /// <summary>
/// 城市 /// 城市
/// </summary> /// </summary>
public string City { get; set; } = string.Empty; public string City { get; set; } = string.Empty;
/// <summary> /// <summary>
/// 城市 /// 城市
/// </summary> /// </summary>
public string CityCN { get; set; } = string.Empty; public string CityCN { get; set; } = string.Empty;
/// <summary> /// <summary>
/// 医院 /// 医院
/// </summary> /// </summary>
public string HospitalName { get; set; } = string.Empty; public string HospitalName { get; set; } = string.Empty;
/// <summary> /// <summary>
/// 医院 /// 医院
/// </summary> /// </summary>
public string HospitalNameCN { get; set; } = string.Empty; public string HospitalNameCN { get; set; } = string.Empty;
} }

View File

@ -1,10 +1,10 @@
namespace IRaCIS.Core.Domain.Models; namespace IRaCIS.Core.Domain.Models;
[Comment("医生 - 医生字典关联表")] [Comment("医生 - 医生字典关联表")]
[Table("DoctorDictionary")] [Table("DoctorDictionary")]
public class DoctorDictionary : Entity public class DoctorDictionary : Entity
{ {
#region 导航属性 #region 导航属性
[JsonIgnore] [JsonIgnore]
[ForeignKey("DoctorId")] [ForeignKey("DoctorId")]
public Doctor Doctor { get; set; } public Doctor Doctor { get; set; }

View File

@ -2,44 +2,44 @@ using IRaCIS.Core.Domain.Share;
namespace IRaCIS.Core.Domain.Models; namespace IRaCIS.Core.Domain.Models;
[Comment("医生 - 概述")] [Comment("医生 - 概述")]
[Table("DoctorSummarize")] [Table("DoctorSummarize")]
public class DoctorSummarize : BaseFullAuditEntity public class DoctorSummarize : BaseFullAuditEntity
{ {
/// <summary> /// <summary>
/// 医生Id /// 医生Id
/// </summary> /// </summary>
public Guid DoctorId { get; set; } public Guid DoctorId { get; set; }
/// <summary> /// <summary>
/// 概述 /// 概述
/// </summary> /// </summary>
[MaxLength] [MaxLength]
public string Summarize { get; set; } = string.Empty; public string Summarize { get; set; } = string.Empty;
/// <summary> /// <summary>
/// 概述 /// 概述
/// </summary> /// </summary>
[MaxLength] [MaxLength]
public string SummarizeEn { get; set; } = string.Empty; public string SummarizeEn { get; set; } = string.Empty;
/// <summary> /// <summary>
/// 是否是主模板 /// 是否是主模板
/// </summary> /// </summary>
public bool IsMain { get; set; } public bool IsMain { get; set; }
/// <summary> /// <summary>
/// 适应症 /// 适应症
/// </summary> /// </summary>
public string Indication { get; set; } public string Indication { get; set; }
/// <summary> /// <summary>
/// 适应症 /// 适应症
/// </summary> /// </summary>
public string IndicationEn { get; set; } public string IndicationEn { get; set; }
/// <summary> /// <summary>
/// 项目Id /// 项目Id
/// </summary> /// </summary>
public Guid? TrialId { get; set; } public Guid? TrialId { get; set; }

View File

@ -1,10 +1,10 @@
namespace IRaCIS.Core.Domain.Models; namespace IRaCIS.Core.Domain.Models;
[Comment("医生计费 - 工作量记录表")] [Comment("医生计费 - 工作量记录表")]
[Table("DoctorWorkload")] [Table("DoctorWorkload")]
public class Workload : BaseFullAuditEntity public class Workload : BaseFullAuditEntity
{ {
#region 导航属性 #region 导航属性
#endregion #endregion

View File

@ -1,10 +1,10 @@
namespace IRaCIS.Core.Domain.Models; namespace IRaCIS.Core.Domain.Models;
[Comment("医生 - 教育信息")] [Comment("医生 - 教育信息")]
[Table("Education")] [Table("Education")]
public class Education : BaseFullAuditEntity public class Education : BaseFullAuditEntity
{ {
#region 导航属性 #region 导航属性
#endregion #endregion
public DateOnly? BeginDate { get; set; } public DateOnly? BeginDate { get; set; }

View File

@ -1,10 +1,10 @@
namespace IRaCIS.Core.Domain.Models; namespace IRaCIS.Core.Domain.Models;
[Comment("医生 - 继续教育经历")] [Comment("医生 - 继续教育经历")]
[Table("Postgraduate")] [Table("Postgraduate")]
public class Postgraduate : BaseFullAuditEntity public class Postgraduate : BaseFullAuditEntity
{ {
#region 导航属性 #region 导航属性
[JsonIgnore] [JsonIgnore]
[ForeignKey("HospitalId")] [ForeignKey("HospitalId")]
public Hospital HospitalEnt { get; set; } public Hospital HospitalEnt { get; set; }

View File

@ -1,10 +1,10 @@
namespace IRaCIS.Core.Domain.Models; namespace IRaCIS.Core.Domain.Models;
[Comment("医生 - 科研学术记录")] [Comment("医生 - 科研学术记录")]
[Table("ResearchPublication")] [Table("ResearchPublication")]
public partial class ResearchPublication : BaseFullAuditEntity public partial class ResearchPublication : BaseFullAuditEntity
{ {
#region 导航属性 #region 导航属性
#endregion #endregion
public Guid DoctorId { get; set; } public Guid DoctorId { get; set; }

View File

@ -2,7 +2,7 @@ using IRaCIS.Core.Domain.Share;
namespace IRaCIS.Core.Domain.Models; namespace IRaCIS.Core.Domain.Models;
[Comment("医生 - 项目临床经历")] [Comment("医生 - 项目临床经历")]
[Table("TrialExperience")] [Table("TrialExperience")]
public partial class TrialExperience : BaseFullAuditEntity public partial class TrialExperience : BaseFullAuditEntity
{ {
@ -10,7 +10,7 @@ public partial class TrialExperience : BaseFullAuditEntity
#region 导航属性 #region 导航属性
[JsonIgnore] [JsonIgnore]
[ForeignKey("TrialId")] [ForeignKey("TrialId")]
@ -33,37 +33,37 @@ public partial class TrialExperience : BaseFullAuditEntity
public DateTime? EndTime { get; set; } public DateTime? EndTime { get; set; }
/// <summary> /// <summary>
/// 其他分期 /// 其他分期
/// </summary> /// </summary>
public string OtherStages { get; set; } = string.Empty; public string OtherStages { get; set; } = string.Empty;
/// <summary> /// <summary>
/// 其他标准 /// 其他标准
/// </summary> /// </summary>
public string OtherCriterion { get; set; } = string.Empty; public string OtherCriterion { get; set; } = string.Empty;
/// <summary> /// <summary>
/// 适应症的枚举 /// 适应症的枚举
/// </summary> /// </summary>
public int IndicationEnum { get; set; } = -1; public int IndicationEnum { get; set; } = -1;
/// <summary> /// <summary>
/// 数据类型 /// 数据类型
/// </summary> /// </summary>
public ExperienceDataType ExperienceDataType { get; set; } public ExperienceDataType ExperienceDataType { get; set; }
/// <summary> /// <summary>
/// 适应症类型ID /// 适应症类型ID
/// </summary> /// </summary>
public Guid IndicationTypeId { get; set; } = Guid.Empty; public Guid IndicationTypeId { get; set; } = Guid.Empty;
/// <summary> /// <summary>
/// 项目Id /// 项目Id
/// </summary> /// </summary>
public Guid? TrialId { get; set; } public Guid? TrialId { get; set; }
/// <summary> /// <summary>
/// 阅片标准 /// 阅片标准
/// </summary> /// </summary>
public CriterionType? CriterionType { get; set; } public CriterionType? CriterionType { get; set; }
} }
@ -72,22 +72,22 @@ public partial class TrialExperience : BaseFullAuditEntity
public enum ExperienceDataType public enum ExperienceDataType
{ {
/// <summary> /// <summary>
/// 系统手动添加 /// 系统手动添加
/// </summary> /// </summary>
System = 0, System = 0,
/// <summary> /// <summary>
/// 项目手动添加或者同系统复制过来的 /// 项目手动添加或者同系统复制过来的
/// </summary> /// </summary>
Trial=1, Trial=1,
/// <summary> /// <summary>
/// 项目自动添加 /// 项目自动添加
/// </summary> /// </summary>
TrialAuto = 2, TrialAuto = 2,
/// <summary> /// <summary>
/// 系统自动添加 /// 系统自动添加
/// </summary> /// </summary>
SystemAuto = 3, SystemAuto = 3,
} }

View File

@ -1,6 +1,6 @@
namespace IRaCIS.Core.Domain.Models; namespace IRaCIS.Core.Domain.Models;
[Comment("医生计费 - 每月支付记录表")] [Comment("医生计费 - 每月支付记录表")]
[Table("Payment")] [Table("Payment")]
public partial class Payment : BaseFullAuditEntity public partial class Payment : BaseFullAuditEntity
{ {

View File

@ -1,6 +1,6 @@
namespace IRaCIS.Core.Domain.Models; namespace IRaCIS.Core.Domain.Models;
[Comment("医生计费 - 每月支付记录表")] [Comment("医生计费 - 每月支付记录表")]
[Table("PaymentAdjustment")] [Table("PaymentAdjustment")]
public partial class PaymentAdjustment : BaseFullAuditEntity public partial class PaymentAdjustment : BaseFullAuditEntity
{ {

View File

@ -1,6 +1,6 @@
namespace IRaCIS.Core.Domain.Models; namespace IRaCIS.Core.Domain.Models;
[Comment("医生计费 - 每月支付详情表")] [Comment("医生计费 - 每月支付详情表")]
[Table("PaymentDetail")] [Table("PaymentDetail")]
public partial class PaymentDetail : BaseFullAuditEntity public partial class PaymentDetail : BaseFullAuditEntity
{ {

View File

@ -1,6 +1,6 @@
namespace IRaCIS.Core.Domain.Models; namespace IRaCIS.Core.Domain.Models;
[Comment("医生计费 - 不同时间点价格设置")] [Comment("医生计费 - 不同时间点价格设置")]
[Table("RankPrice")] [Table("RankPrice")]
public partial class RankPrice : BaseFullAuditEntity public partial class RankPrice : BaseFullAuditEntity
{ {

View File

@ -1,6 +1,6 @@
namespace IRaCIS.Core.Domain.Models; namespace IRaCIS.Core.Domain.Models;
[Comment("医生计费 - 支付信息表")] [Comment("医生计费 - 支付信息表")]
[Table("DoctorPayInformation")] [Table("DoctorPayInformation")]
public partial class ReviewerPayInformation : BaseFullAuditEntity public partial class ReviewerPayInformation : BaseFullAuditEntity
{ {

View File

@ -1,6 +1,6 @@
namespace IRaCIS.Core.Domain.Models; namespace IRaCIS.Core.Domain.Models;
[Comment("医生计费 - 项目支付配置")] [Comment("医生计费 - 项目支付配置")]
[Table("TrialPaymentPrice")] [Table("TrialPaymentPrice")]
public partial class TrialPaymentPrice : BaseFullAuditEntity public partial class TrialPaymentPrice : BaseFullAuditEntity
{ {
@ -17,6 +17,6 @@ public partial class TrialPaymentPrice : BaseFullAuditEntity
[DecimalPrecision(18, 2)] [DecimalPrecision(18, 2)]
public decimal AdjustmentMultiple { get; set; } = 1; public decimal AdjustmentMultiple { get; set; } = 1;
[Comment("是否有 为新项目")] [Comment("是否有 为新项目")]
public bool? IsNewTrial { get; set; } = false; public bool? IsNewTrial { get; set; } = false;
} }

View File

@ -1,6 +1,6 @@
namespace IRaCIS.Core.Domain.Models; namespace IRaCIS.Core.Domain.Models;
[Comment("医生计费 - 奖励")] [Comment("医生计费 - 奖励")]
[Table("VolumeReward")] [Table("VolumeReward")]
public partial class VolumeReward : BaseFullAuditEntity public partial class VolumeReward : BaseFullAuditEntity
{ {

View File

@ -7,10 +7,14 @@ public class FileUploadRecord : BaseFullAuditEntity
#region 导航属性 #region 导航属性
[JsonIgnore] [JsonIgnore]
public Trial Trial { get; set; } public Trial Trial { get; set; }
[JsonIgnore]
public Subject Subject { get; set; } public Subject Subject { get; set; }
[JsonIgnore]
public SubjectVisit SubjectVisit { get; set; } public SubjectVisit SubjectVisit { get; set; }
[JsonIgnore]
public DicomStudy DicomStudy { get; set; }
[JsonIgnore]
public NoneDicomStudy NoneDicomStudy { get; set; }
#endregion #endregion
public Guid? TrialId { get; set; } public Guid? TrialId { get; set; }
@ -19,35 +23,50 @@ public class FileUploadRecord : BaseFullAuditEntity
public Guid? SubjectVisitId { get; set; } 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 string FileName { get; set; }
public long FileSize { 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)] [StringLength(1000)]
public string Path { get; set; } public string Path { get; set; }
[Comment("文件标识ID")]
public string FileMarkId { get; set; }
[Comment("是否需要同步")] [Comment("是否需要同步")]
public bool? IsNeedSync { get; set; } public bool? IsNeedSync { get; set; }
[Comment("同步优先级")]
public int? Priority { get; set; }
[Comment("是否已同步-最后一个任务的状态")] [Comment("是否已同步-最后一个任务的状态")]
public bool? IsSync { get; set; } public bool? IsSync { get; set; }
[Comment("同步结束时间-最后一个任务的时间")] [Comment("同步结束时间-最后一个任务的时间")]
public DateTime? syncFinishedTime { get; set; } public DateTime? SyncFinishedTime { get; set; }
public string IP { get; set; } public string IP { get; set; }
@ -65,7 +84,6 @@ public class UploadFileSyncRecord : BaseFullAuditEntity
public Guid FileUploadRecordId { get; set; } public Guid FileUploadRecordId { get; set; }
public int Priority { get; set; }
public DateTime? StartTime { get; set; } public DateTime? StartTime { get; set; }
@ -80,14 +98,14 @@ public class UploadFileSyncRecord : BaseFullAuditEntity
public enum jobState public enum jobState
{ {
//待启动 //待启动
PENDING= 0, PENDING = 0,
//上传中 //上传中
RUNNING= 1, RUNNING = 1,
SUCCESS= 2, SUCCESS = 2,
FAILED= 3, FAILED = 3,
CANCELLED= 4 CANCELLED = 4
} }

View File

@ -1,10 +1,10 @@
namespace IRaCIS.Core.Domain.Models; namespace IRaCIS.Core.Domain.Models;
[Comment("机构 - CRO")] [Comment("机构 - CRO")]
[Table("CROCompany")] [Table("CROCompany")]
public class CRO : BaseFullAuditEntity public class CRO : BaseFullAuditEntity
{ {
#region 导航属性 #region 导航属性
#endregion #endregion
@ -14,7 +14,7 @@ public class CRO : BaseFullAuditEntity
public string CRONameCN { get; set; } = null!; public string CRONameCN { get; set; } = null!;
[Comment("是否是项目级别")] [Comment("是否是项目级别")]
public bool IsTrialLevel { get; set; } public bool IsTrialLevel { get; set; }
public Guid? TrialId { get; set; } public Guid? TrialId { get; set; }

View File

@ -1,10 +1,10 @@
namespace IRaCIS.Core.Domain.Models; namespace IRaCIS.Core.Domain.Models;
[Comment("机构 - Site")] [Comment("机构 - Site")]
[Table("Site")] [Table("Site")]
public class Site : BaseFullAuditEntity public class Site : BaseFullAuditEntity
{ {
#region 导航属性 #region 导航属性
[JsonIgnore] [JsonIgnore]
[ForeignKey("HospitalId")] [ForeignKey("HospitalId")]
public Hospital Hospital { get; set; } public Hospital Hospital { get; set; }

View File

@ -1,10 +1,10 @@
namespace IRaCIS.Core.Domain.Models; namespace IRaCIS.Core.Domain.Models;
[Comment("机构 - Sponsor")] [Comment("机构 - Sponsor")]
[Table("Sponsor")] [Table("Sponsor")]
public partial class Sponsor : BaseFullAuditEntity public partial class Sponsor : BaseFullAuditEntity
{ {
#region 导航属性 #region 导航属性
#endregion #endregion
public string SponsorName { get; set; } = String.Empty; public string SponsorName { get; set; } = String.Empty;

View File

@ -3,11 +3,11 @@ using IRaCIS.Core.Domain.Share;
namespace IRaCIS.Core.Domain.Models; namespace IRaCIS.Core.Domain.Models;
[Comment("后台 - 系统账户角色关系表")] [Comment("后台 - 系统账户角色关系表")]
[Table("User")] [Table("User")]
public class UserRole : BaseFullAuditEntity public class UserRole : BaseFullAuditEntity
{ {
#region 导航属性 #region 导航属性
[ForeignKey("IdentityUserId")] [ForeignKey("IdentityUserId")]
[JsonIgnore] [JsonIgnore]
@ -37,24 +37,24 @@ public class UserRole : BaseFullAuditEntity
public string LastName { get; set; } public string LastName { get; set; }
[Comment("自动切换下一个任务")] [Comment("自动切换下一个任务")]
public bool AutoCutNextTask { get; set; } public bool AutoCutNextTask { get; set; }
/// <summary> /// <summary>
/// 是否双屏 /// 是否双屏
/// </summary> /// </summary>
public bool IsDoubleScreen { get; set; } = false; public bool IsDoubleScreen { get; set; } = false;
[Comment("医生生成账号后,会有值")] [Comment("医生生成账号后,会有值")]
public Guid? DoctorId { get; set; } public Guid? DoctorId { get; set; }
public UserTypeEnum UserTypeEnum { get; set; } public UserTypeEnum UserTypeEnum { get; set; }
public Guid UserTypeId { get; set; } public Guid UserTypeId { get; set; }
#region 新增字段 #region 新增字段
public Guid IdentityUserId { get; set; } public Guid IdentityUserId { get; set; }
@ -63,7 +63,7 @@ public class UserRole : BaseFullAuditEntity
#endregion #endregion
} }
[Comment("后台 - 系统真实账户表")] [Comment("后台 - 系统真实账户表")]
[Table("IdentityUser")] [Table("IdentityUser")]
public class IdentityUser : BaseFullAuditEntity public class IdentityUser : BaseFullAuditEntity
{ {
@ -87,7 +87,7 @@ public class IdentityUser : BaseFullAuditEntity
[Projectable] [Projectable]
public string FullName => LastName + " / " + FirstName; public string FullName => LastName + " / " + FirstName;
#region 用户信息 #region 用户信息
public int Code { get; set; } public int Code { get; set; }
public string UserCode { get; set; } public string UserCode { get; set; }
@ -117,20 +117,20 @@ public class IdentityUser : BaseFullAuditEntity
public string PositionName { get; set; } public string PositionName { get; set; }
[Comment("这个字段废除,放在用户角色上面,后续删除")] [Comment("这个字段废除,放在用户角色上面,后续删除")]
public bool AutoCutNextTask { get; set; } public bool AutoCutNextTask { get; set; }
public string DepartmentName { get; set; } public string DepartmentName { get; set; }
[Comment("首次登录需要修改密码")] [Comment("首次登录需要修改密码")]
public bool IsFirstAdd { get; set; } = true; public bool IsFirstAdd { get; set; } = true;
public bool IsTestUser { get; set; } public bool IsTestUser { get; set; }
[Comment("内部用户 外部用户")] [Comment("内部用户 外部用户")]
public bool IsZhiZhun { get; set; } public bool IsZhiZhun { get; set; }
[Comment("上一次修改密码的时间")] [Comment("上一次修改密码的时间")]
public DateTime? LastChangePassWordTime { get; set; } public DateTime? LastChangePassWordTime { get; set; }
public string LastLoginIP { get; set; } public string LastLoginIP { get; set; }
@ -140,7 +140,7 @@ public class IdentityUser : BaseFullAuditEntity
#endregion #endregion
#region 用户来源 #region 用户来源
public UserCeateSource UserCeateSource { get; set; } public UserCeateSource UserCeateSource { get; set; }
@ -149,12 +149,12 @@ public class IdentityUser : BaseFullAuditEntity
#endregion #endregion
/// <summary> /// <summary>
/// 用户协议Id /// 用户协议Id
/// </summary> /// </summary>
public Guid? UserAgreementId { get; set; } public Guid? UserAgreementId { get; set; }
/// <summary> /// <summary>
/// 隐私政策Id /// 隐私政策Id
/// </summary> /// </summary>
public Guid? PrivacyPolicyId { get; set; } public Guid? PrivacyPolicyId { get; set; }
} }

View File

@ -1,10 +1,10 @@
namespace IRaCIS.Core.Domain.Models; namespace IRaCIS.Core.Domain.Models;
[Comment("后台 - 系统用户类型菜单中间关系表 (需要同步)")] [Comment("后台 - 系统用户类型菜单中间关系表 (需要同步)")]
[Table("UserTypeMenu")] [Table("UserTypeMenu")]
public partial class UserTypeMenu : Entity public partial class UserTypeMenu : Entity
{ {
#region 导航属性 #region 导航属性
[JsonIgnore] [JsonIgnore]
[ForeignKey("UserTypeId")] [ForeignKey("UserTypeId")]

View File

@ -2,11 +2,11 @@ using IRaCIS.Core.Domain.Share;
namespace IRaCIS.Core.Domain.Models; namespace IRaCIS.Core.Domain.Models;
[Comment("系统标准 - 全局配置 (需要同步)")] [Comment("系统标准 - 全局配置 (需要同步)")]
[Table("ReadingSystemCriterionDictionary")] [Table("ReadingSystemCriterionDictionary")]
public class ReadingSystemCriterionDictionary : BaseAddAuditEntity public class ReadingSystemCriterionDictionary : BaseAddAuditEntity
{ {
#region 导航属性 #region 导航属性
[JsonIgnore] [JsonIgnore]
[ForeignKey("DictionaryId")] [ForeignKey("DictionaryId")]
@ -20,6 +20,6 @@ public class ReadingSystemCriterionDictionary : BaseAddAuditEntity
public bool IsBaseLineUse { get; set; } = false; public bool IsBaseLineUse { get; set; } = false;
public bool IsFollowVisitUse { get; set; } = false; public bool IsFollowVisitUse { get; set; } = false;
[Comment("标准字典分组")] [Comment("标准字典分组")]
public CrterionDictionaryGroup CrterionDictionaryGroup { get; set; } = CrterionDictionaryGroup.General; public CrterionDictionaryGroup CrterionDictionaryGroup { get; set; } = CrterionDictionaryGroup.General;
} }

View File

@ -2,14 +2,14 @@ using IRaCIS.Core.Domain.Share;
namespace IRaCIS.Core.Domain.Models; namespace IRaCIS.Core.Domain.Models;
[Comment("医生 - 入组项目流程记录表")] [Comment("医生 - 入组项目流程记录表")]
[Table("EnrollDetail")] [Table("EnrollDetail")]
public partial class EnrollDetail : BaseAddAuditEntity public partial class EnrollDetail : BaseAddAuditEntity
{ {
#region 导航属性 #region 导航属性
[JsonIgnore] [JsonIgnore]
public virtual TrialStatusDetail TrialDetail { get; set; } public virtual TrialStatusDetail TrialDetail { get; set; }
[JsonIgnore] [JsonIgnore]

View File

@ -1,10 +1,10 @@
namespace IRaCIS.Core.Domain.Models; namespace IRaCIS.Core.Domain.Models;
[Comment("项目 - 项目字典关系表")] [Comment("项目 - 项目字典关系表")]
[Table("TrialDictionary")] [Table("TrialDictionary")]
public partial class TrialDictionary : Entity public partial class TrialDictionary : Entity
{ {
#region 导航属性 #region 导航属性
[JsonIgnore] [JsonIgnore]
public virtual Trial Trial { get; set; } public virtual Trial Trial { get; set; }
[JsonIgnore] [JsonIgnore]

View File

@ -1,10 +1,10 @@
namespace IRaCIS.Core.Domain.Models; namespace IRaCIS.Core.Domain.Models;
[Comment("项目 - 入组流程记录")] [Comment("项目 - 入组流程记录")]
[Table("TrialStatus")] [Table("TrialStatus")]
public partial class TrialStatusDetail : BaseAddAuditEntity public partial class TrialStatusDetail : BaseAddAuditEntity
{ {
#region 导航属性 #region 导航属性
[JsonIgnore] [JsonIgnore]
public Trial Trial { get; set; } public Trial Trial { get; set; }
#endregion #endregion

View File

@ -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 Remove-Migration
3、以下命令将数据库更新为最新迁移 3、以下命令将数据库更新为最新迁移
Update-Database Update-Database
4、以下命令将数据库更新为给定迁移 4、以下命令将数据库更新为给定迁移
Update-Database xxxName Update-Database xxxName
5、以下命令将生成一个从指定 from 迁移到指定 to 迁移的 SQL 脚本。 5、以下命令将生成一个从指定 from 迁移到指定 to 迁移的 SQL 脚本。
Script-Migration from to Script-Migration from to
针对字符串类型 不是默认长度400的需要标注 针对字符串类型 不是默认长度400的需要标注
比如 [StringLength(1000)] 设置1000 比如 [StringLength(1000)] 设置1000
比如 [MaxLength] 自动设置为 nvarchar(max) 比如 [MaxLength] 自动设置为 nvarchar(max)
针对decimal 类型 针对decimal 类型
默认是: [DecimalPrecision(18, 2)] 默认是: [DecimalPrecision(18, 2)]
如果其他的可以这样设置比如: [DecimalPrecision(18, 4)] 如果其他的可以这样设置比如: [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 dotnet ef migrations add Initial -p IRaCIS.Core.Infra.EFCore
2、撤销生成的迁移文件 2、撤销生成的迁移文件
dotnet ef migrations remove -p IRaCIS.Core.Infra.EFCore dotnet ef migrations remove -p IRaCIS.Core.Infra.EFCore
3、将迁移文件更新到数据库 3、将迁移文件更新到数据库
dotnet ef database update -p IRaCIS.Core.Infra.EFCore dotnet ef database update -p IRaCIS.Core.Infra.EFCore
4、以下命令将数据库更新为给定迁移 4、以下命令将数据库更新为给定迁移
dotnet ef database update xxxName -p IRaCIS.Core.Infra.EFCore 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 dotnet ef migrations script from to -p IRaCIS.Core.Infra.EFCore
6、查看迁移列表 6、查看迁移列表
dotnet ef migrations list -p IRaCIS.Core.Infra.EFCore dotnet ef migrations list -p IRaCIS.Core.Infra.EFCore

View File

@ -1,12 +1,12 @@
# 构建表名参数列表用于 Scaffold 命令 # 构建表名参数列表用于 Scaffold 命令
param ( param (
[string[]]$Tables [string[]]$Tables
) )
# 构建表名参数列表 # 构建表名参数列表
$tablesForScaffold = "" $tablesForScaffold = ""
foreach ($table in $Tables) { foreach ($table in $Tables) {
$tablesForScaffold += "-t $table " $tablesForScaffold += "-t $table "
@ -15,15 +15,15 @@ foreach ($table in $Tables) {
$tablesForRun = $Tables -join " " $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 #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" $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 Invoke-Expression $scaffoldCommand
Write-Host "正在执行 dotnet run..." Write-Host "正在执行 dotnet run..."
#dotnet run --project IRaCIS.Core.Test -- $tablesForRun #dotnet run --project IRaCIS.Core.Test -- $tablesForRun
# 使用 Invoke-Expression 直接执行构造好的命令 # 使用 Invoke-Expression 直接执行构造好的命令
$runCommand = "dotnet run --project IRaCIS.Core.Test -- $tablesForRun" $runCommand = "dotnet run --project IRaCIS.Core.Test -- $tablesForRun"
Invoke-Expression $runCommand Invoke-Expression $runCommand

View File

@ -1,29 +1,29 @@
#参考学习文档 #参考学习文档
https://www.cnblogs.com/cqpanda/p/16815263.html 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 dotnet ef migrations add xxx -p IRaCIS.Core.Test -c IRCContext
2、撤销生成的迁移文件 2、撤销生成的迁移文件
dotnet ef migrations remove -p IRaCIS.Core.Test -c IRCContext dotnet ef migrations remove -p IRaCIS.Core.Test -c IRCContext
3、将迁移文件更新到数据库 3、将迁移文件更新到数据库
dotnet ef database update -p IRaCIS.Core.Test -c IRCContext dotnet ef database update -p IRaCIS.Core.Test -c IRCContext
4、以下命令将数据库更新为给定迁移 4、以下命令将数据库更新为给定迁移
dotnet ef database update xxxName -p IRaCIS.Core.Test -c IRCContext 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 dotnet ef migrations script from to -p IRaCIS.Core.Test -c IRCContext